UserWarning: Unknown distribution option when using pbr with Python 3.6
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PBR |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
It seems that the interaction between distutils, setuptools and pbr is broken when running against Python 3.6 (development release).
To reproduce the problem, run this:
# Download and install Python 3.6
pip3.6 install --user -U pip
pip3.6 install --user -U wheel setuptools pbr
git clone https:/
cd fixtures
python3.6 setup.py egg_info
You'll get an output similar to:
/home/ubuntu/
warnings.
/home/ubuntu/
warnings.
/home/ubuntu/
warnings.
/home/ubuntu/
warnings.
/home/ubuntu/
warnings.
running egg_info
writing fixtures.
writing dependency_links to fixtures.
writing top-level names to fixtures.
writing pbr to fixtures.
[pbr] Processing SOURCES.txt
[pbr] In git context, generating filelist from git
warning: no files found matching 'AUTHORS'
warning: no files found matching 'ChangeLog'
warning: no previously-included files found matching '.gitreview'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
reading manifest template 'MANIFEST.in'
writing manifest file 'fixtures.
The "pip3.6 list" command shows:
docutils (0.12)
extras (1.0.0)
fixtures (3.0.1.dev17)
linecache2 (1.0.0)
mock (2.0.0)
pbr (1.10.0)
pip (8.1.2)
python-mimeparse (1.6.0)
setuptools (28.6.0)
six (1.10.0)
testtools (2.2.0)
traceback2 (1.4.0)
unittest2 (1.1.0)
wheel (0.29.0)
Essentially when running against Python 3.6, the setuptools egg_info command doesn't correctly write the requires.txt file in the egg directory.
I think the reason for which the egg_info command is broken is because when pbr gets to this line:
https:/
with "key" being either "install_requires" or "extras_requires", the dist object has not those attributes at all (they would normally be set to None by previous setuptools entry point hooks).
This turns makes "pip3.6 install -U .[docs,test]" not install the dependencies at all (since there's no requires.txt):
ubuntu:
Processing /home/ubuntu/
fixtures 3.0.1.dev17 does not provide the extra 'docs'
fixtures 3.0.1.dev17 does not provide the extra 'test'
Installing collected packages: fixtures
Found existing installation: fixtures 3.0.1.dev17
Uninstalling fixtures-
Successfully uninstalled fixtures-
Running setup.py install for fixtures ... done
Successfully installed fixtures-
For even more details see:
works great with python 3.6, end of 2017. should be officially supported