Comments (8)
there's no reason to write a setup py like that, inline it and it'll get converted -- see above
from setup-py-upgrade.
note that in the general case you're asking setup-py-upgrade to solve the halting problem, which is intractable
from setup-py-upgrade.
yeah this is (intentionally) not implemented -- probably needs more of a mention in this section in the README: https://github.com/asottile/setup-py-upgrade#what-is-not-supported
there's currently parsing supported for converting this into file:
though so if there's some obvious pattern that can be used then that's a possibility:
with open('filename') as f:
contents = f.read()
setup(varname=contents)
from setup-py-upgrade.
without seeing the setup.py
I don't know what case your particular one falls into
from setup-py-upgrade.
yeah this is (intentionally) not implemented -- probably needs more of a mention in this section in the README: https://github.com/asottile/setup-py-upgrade#what-is-not-supported
I think the most valuable would be a clearer error message (print key and reformatted name and indicate that non-literal values are not supported), it's possible to infer what happens from the traceback but it gives a bit of a pause and it's hardly pretty.
without seeing the setup.py I don't know what case your particular one falls into
Much of the metadata is gotten from an other python file so it would be surprising for things to work in retrospect, I just ran the script to take a look.
from setup-py-upgrade.
I'm not sure what you expected 😆 would you like to submit a PR?
from setup-py-upgrade.
I encountered this error too when I ran setup-py-upgrade on this simple setup.py file:
from setuptools import setup
install_requirements = ['attrs']
setup(
name='test',
install_requires=install_requirements
)
Is this possible to fix at all, or is there some inherent limitation of python's ast module that makes it unfixable?
from setup-py-upgrade.
Ok, thanks!
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
- 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
- Consider adding support for `extras_require` HOT 6
- 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.