Comments (6)
works fine for me:
from setuptools import setup
setup(
name='wat',
extras_require={
'foo': ['cfgv'],
'bar': ['astpretty', 'pyupgrade'],
},
)
$ setup-py-upgrade .
./setup.py and ./setup.cfg written!
[metadata]
name = wat
[options.extras_require]
foo = cfgv
bar =
astpretty
pyupgrade
from setup-py-upgrade.
@asottile Ummm, you are right. However, it doesn't support explicitly changing this section. Take the following as an example:
from setuptools import setup
extra_requires = {
'foo': ['cfgv'],
'bar': ['astpretty', 'pyupgrade'],
}
extra_requires['bar'] += extra_requires['foo']
setup(
name='wat',
extras_require=extra_requires,
)
$ setup-py-upgrade .
Traceback (most recent call last):
File ".venv/bin/setup-py-upgrade", line 8, in <module>
sys.exit(main())
visitor.visit(tree)
File "/usr/lib/python3.8/ast.py", line 371, in visit
return visitor(node)
File "/usr/lib/python3.8/ast.py", line 379, in generic_visit
self.visit(item)
File "/usr/lib/python3.8/ast.py", line 371, in visit
return visitor(node)
File "/usr/lib/python3.8/ast.py", line 381, in generic_visit
self.visit(value)
File "/usr/lib/python3.8/ast.py", line 371, in visit
return visitor(node)
File ".venv/lib/python3.8/site-packages/setup_py_upgrade.py", line 128, in visit_Call
raise NotImplementedError(f'unparsable: {kwd.arg}=')
NotImplementedError: unparsable: extras_require=
from setup-py-upgrade.
yeah it cannot solve the halting problem -- your code needs to be identifiable statically
from setup-py-upgrade.
Got it! I think It would be great to add support for this dynamic case.
from setup-py-upgrade.
the halting problem is unsolvable
from setup-py-upgrade.
... by any Turing machine. However, I think we, as human species, are not able to determine whether or not a given Turing machine will halt...
from setup-py-upgrade.
Related Issues (14)
- support entry_points passed as a string HOT 1
- Dictionaries not converted properly HOT 3
- support for data_files kwarg HOT 3
- "Unparsable" NotImplemementedError when getting values from variables HOT 8
- suport upgrading pbr setup.py/setup.cfg to native setuptools declarative HOT 2
- Support package_data with empty key HOT 2
- Unsupported HOT 1
- Stop using deprecated 'license_file' wheel option HOT 1
- Support package_data with empty key and multiple values HOT 3
- Multiple failures on running the package HOT 1
- Doesn't support variables for metadata values in setup.py HOT 3
- strips shebang lines HOT 3
- It breaks if I use `open().read()` as value of a field HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from setup-py-upgrade.