Giter VIP home page Giter VIP logo

Comments (8)

asottile avatar asottile commented on August 18, 2024 1

there's no reason to write a setup py like that, inline it and it'll get converted -- see above

from setup-py-upgrade.

asottile avatar asottile commented on August 18, 2024 1

note that in the general case you're asking setup-py-upgrade to solve the halting problem, which is intractable

from setup-py-upgrade.

asottile avatar asottile commented on August 18, 2024

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.

asottile avatar asottile commented on August 18, 2024

without seeing the setup.py I don't know what case your particular one falls into

from setup-py-upgrade.

xmo-odoo avatar xmo-odoo commented on August 18, 2024

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.

asottile avatar asottile commented on August 18, 2024

I'm not sure what you expected 😆 would you like to submit a PR?

from setup-py-upgrade.

wwuck avatar wwuck commented on August 18, 2024

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.

wwuck avatar wwuck commented on August 18, 2024

Ok, thanks!

from setup-py-upgrade.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.