Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 696982 - dev-python/astor-0.7.1 with =dev-python/setuptools-41.4.0 - File "/usr/lib64/python2.7/site-packages/setuptools/_vendor/packaging/", line 594, in __init__: AttributeError: 'SpecifierSet' object has no attribute 'split'
Summary: dev-python/astor-0.7.1 with =dev-python/setuptools-41.4.0 - File "/...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Python Gentoo Team
Depends on:
Reported: 2019-10-08 16:39 UTC by Horea Christian
Modified: 2020-03-26 11:50 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---

build.log (build.log,3.94 KB, text/plain)
2019-10-08 16:39 UTC, Horea Christian
emerge --info (,6.04 KB, text/plain)
2019-10-08 16:39 UTC, Horea Christian
Patch for astor-0.7.1 according to PR: (astor-0.7.1.patch,2.01 KB, patch)
2019-11-25 07:42 UTC, Zitian Li
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Horea Christian 2019-10-08 16:39:18 UTC
Created attachment 592134 [details]

Emerging dev-python/astor with =dev-python/setuptools-41.4.0 fails with the attached build log.

The relevant section being:

AttributeError: 'SpecifierSet' object has no attribute 'split'

This error does not happen if setuptools is downgraded to 41.2.0.
Comment 1 Horea Christian 2019-10-08 16:39:54 UTC
Created attachment 592136 [details]
emerge --info
Comment 2 Peter Serbe 2019-10-17 06:34:56 UTC
I happened to hit this bug, too, while trying to install sci-libs/tensorflow-2.0.0, which has dev-python/astor-0.7.1 as dependency. And after a short web search, I got the impression, that this issue seems quite common. See e.g.:
Happily the downgrade of setuptools worked as a (temporary?) fix.
Comment 3 wolfwood 2019-10-25 20:59:43 UTC
also fails for python 3.6

 * python3_6: running distutils-r1_run_phase distutils-r1_python_compile                                                                                                                                            
python3.6 build                                                                                                                                                                                            
Traceback (most recent call last):                                                                                                                                                                                  
  File "", line 17, in <module>                                                                   
  File "/usr/lib64/python3.6/site-packages/setuptools/", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib64/python3.6/distutils/", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib64/python3.6/site-packages/setuptools/", line 447, in __init__
    k: v for k, v in attrs.items()                                                                        
  File "/usr/lib64/python3.6/distutils/", line 281, in __init__                      
  File "/usr/lib64/python3.6/site-packages/setuptools/", line 735, in finalize_options           
    ep.load()(self,, value)                                                                       
  File "/usr/lib64/python3.6/site-packages/setuptools/", line 291, in check_specifier
  File "/usr/lib64/python3.6/site-packages/setuptools/_vendor/packaging/", line 594, in __init__
    specifiers = [s.strip() for s in specifiers.split(",") if s.strip()]
AttributeError: 'SpecifierSet' object has no attribute 'split'
Comment 4 Ștefan Talpalaru 2019-11-03 14:36:44 UTC
Fixed by this PR:

A patched astor-0.8.0 is available in my overlay:
Comment 5 Zitian Li 2019-11-25 07:42:17 UTC
Created attachment 597468 [details, diff]
Patch for astor-0.7.1 according to PR:
Comment 6 Paul Bors 2019-12-03 05:39:03 UTC
(In reply to Ștefan Talpalaru from comment #4)
> Fixed by this PR:
> A patched astor-0.8.0 is available in my overlay:

I can confirm above patched overlay worked for me on amd64.

Thank you Stefan (& if you're Romanian, bravo tu!).
Comment 7 Brian Evans Gentoo Infrastructure gentoo-dev 2020-01-10 20:11:58 UTC
FWIW, dev-python/astor-0.8.1 is in the Gentoo repo which fixes this issue.  Perhaps a stable in the near future would help users.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-03-26 11:50:23 UTC
Old version removed.  Please reopen if you can reproduce it with the current version.