molecule: master: pip install -e . fails with TypeError: expected str, bytes or os.PathLike object, not NoneType
The problem seems to be related to recent pep517/setuptools/packaging changes but is really worrig because it totally breaks packaging.
$ pip install -e . [15:59:21]
Obtaining file:///Users/ssbarnea/os/molecule
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
Complete output from command /Users/ssbarnea/rdo/tripleo-ci/.tox/molecule/bin/python3.6 /Users/ssbarnea/rdo/tripleo-ci/.tox/molecule/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/3q/pc1jcyjj3qqbj6_x7n4kbtqw0000gn/T/tmpjmy837ev:
running dist_info
creating /Users/ssbarnea/os/molecule/pip-wheel-metadata/molecule.egg-info
writing /Users/ssbarnea/os/molecule/pip-wheel-metadata/molecule.egg-info/PKG-INFO
writing dependency_links to /Users/ssbarnea/os/molecule/pip-wheel-metadata/molecule.egg-info/dependency_links.txt
writing entry points to /Users/ssbarnea/os/molecule/pip-wheel-metadata/molecule.egg-info/entry_points.txt
writing requirements to /Users/ssbarnea/os/molecule/pip-wheel-metadata/molecule.egg-info/requires.txt
writing top-level names to /Users/ssbarnea/os/molecule/pip-wheel-metadata/molecule.egg-info/top_level.txt
writing manifest file '/Users/ssbarnea/os/molecule/pip-wheel-metadata/molecule.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file '/Users/ssbarnea/os/molecule/pip-wheel-metadata/molecule.egg-info/SOURCES.txt'
creating '/Users/ssbarnea/os/molecule/pip-wheel-metadata/molecule.dist-info'
Traceback (most recent call last):
File "/Users/ssbarnea/rdo/tripleo-ci/.tox/molecule/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
main()
File "/Users/ssbarnea/rdo/tripleo-ci/.tox/molecule/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/ssbarnea/rdo/tripleo-ci/.tox/molecule/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 69, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/Users/ssbarnea/.pyenv/versions/3.6.7/lib/python3.6/site-packages/setuptools/build_meta.py", line 113, in prepare_metadata_for_build_wheel
_run_setup()
File "/Users/ssbarnea/.pyenv/versions/3.6.7/lib/python3.6/site-packages/setuptools/build_meta.py", line 72, in _run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 351, in <module>
__name__ == '__main__' and setuptools.setup(**setup_params)
File "/Users/ssbarnea/.pyenv/versions/3.6.7/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/Users/ssbarnea/.pyenv/versions/3.6.7/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users/ssbarnea/.pyenv/versions/3.6.7/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/Users/ssbarnea/.pyenv/versions/3.6.7/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "setup.py", line 323, in run
return setuptools.command.dist_info.dist_info.run(self)
File "/Users/ssbarnea/.pyenv/versions/3.6.7/lib/python3.6/site-packages/setuptools/command/dist_info.py", line 36, in run
bdist_wheel.egg2dist(egg_info.egg_info, dist_info_dir)
File "/Users/ssbarnea/.pyenv/versions/3.6.7/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 443, in egg2dist
shutil.copy(license, os.path.join(self.distinfo_dir, license_filename))
File "/Users/ssbarnea/rdo/tripleo-ci/.tox/molecule/lib/python3.6/posixpath.py", line 80, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
----------------------------------------
Command "/Users/ssbarnea/rdo/tripleo-ci/.tox/molecule/bin/python3.6 /Users/ssbarnea/rdo/tripleo-ci/.tox/molecule/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/3q/pc1jcyjj3qqbj6_x7n4kbtqw0000gn/T/tmpjmy837ev" failed with error code 1 in /Users/ssbarnea/os/molecule
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 15 (12 by maintainers)
upgrade your pip via
curl https://bootstrap.pypa.io/get-pip.py | python -
I had same problem, and I was using pip (9.0.1) version, but when I upgraded pip to (20.3.3), it got resolved.
Oh, this is totally weird. Don’t do this.
@akash-harijan Saved my day! thanks 😄
Upgrade pip to avoid it!
I was able to find an workaround for this issue, which may be problematic in some cases: