@@ -46,14 +46,19 @@ def identify(self, desc): # noqa: D102
4646 desc .name = name
4747
4848 desc .metadata ['version' ] = config ['metadata' ].version
49-
50- desc .dependencies ['build' ].update (config ['setup_requires' ])
51- desc .dependencies ['run' ].update (config ['install_requires' ])
52- desc .dependencies ['test' ].update (config ['tests_require' ])
49+ desc .dependencies = {
50+ 'build' : {create_dependency_descriptor (c ) for c in
51+ config ['setup_requires' ]},
52+ 'run' : {create_dependency_descriptor (c ) for c in
53+ config ['install_requires' ]},
54+ 'test' : {create_dependency_descriptor (c ) for c in
55+ config ['tests_require' ]},
56+ }
5357
5458 def getter (env ):
5559 nonlocal setup_py
56- return get_setup_result (setup_py , env )
60+ d = get_setup_result (setup_py , env )
61+ return d
5762
5863 desc .metadata ['get_python_setup_options' ] = getter
5964
@@ -66,11 +71,10 @@ def get_setup_result(setup_py, env=None):
6671 :param env: environment variables to set before running setup.py
6772 :return: Dictionary of data describing the package.
6873 """
69-
7074 conn_recv , conn_send = multiprocessing .Pipe (duplex = False )
7175 p = multiprocessing .Process (
7276 target = _get_setup_result_target ,
73- args = (setup_py , env , conn_send )
77+ args = (setup_py . absolute () , env , conn_send )
7478 )
7579 p .start ()
7680 p .join ()
@@ -79,7 +83,7 @@ def get_setup_result(setup_py, env=None):
7983 setup_py , p .exitcode )
8084
8185 if not conn_recv .poll ():
82- return None
86+ raise RuntimeError ( 'No results available from Python setup script' )
8387 return conn_recv .recv ()
8488
8589
0 commit comments