Coder Social home page Coder Social logo

Fix setup.py about atomic HOT 14 CLOSED

projectatomic avatar projectatomic commented on June 26, 2024
Fix setup.py

from atomic.

Comments (14)

rhatdan avatar rhatdan commented on June 26, 2024

Not sure how this is supposed to work.

You want to just grab setup.py without having Atomic/atomic.py in the same directory?
What is
python setup.py develop
do?

 python setup.py develop
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'develop'

from atomic.

rtnpro avatar rtnpro commented on June 26, 2024

@rhatdan

python setup.py develop
allows one to installs the package (typically just a source folder) in a way that allows you to conveniently edit your code after its installed to the (virtual) environment and have the changes take effect immediately. (w.r.t. http://stackoverflow.com/a/19048754)
http://pythonhosted.org//setuptools/setuptools.html#develop-deploy-the-project-source-in-development-mode

from atomic.

rhatdan avatar rhatdan commented on June 26, 2024

@rtnpro Thanks. I figured out what you were talking about when I saw your pull requests.

from atomic.

rtnpro avatar rtnpro commented on June 26, 2024

@rhatdan :)

from atomic.

rtnpro avatar rtnpro commented on June 26, 2024

I am trying to setup this repo from scratch again, today, and I ran into this error:

(atomic)[rtnpro@rtnpro atomic]$ python setup.py develop
Traceback (most recent call last):
  File "setup.py", line 9, in <module>
    from Atomic import __version__
  File "/home/rtnpro/workspace/projectatomic/atomic/Atomic/__init__.py", line 3, in <module>
    from .pulp import PulpServer, PulpConfig
  File "/home/rtnpro/workspace/projectatomic/atomic/Atomic/pulp.py", line 2, in <module>
    import requests
ImportError: No module named requests
(atomic)[rtnpro@rtnpro atomic]$ python setup.py install
Traceback (most recent call last):
  File "setup.py", line 9, in <module>
    from Atomic import __version__
  File "/home/rtnpro/workspace/projectatomic/atomic/Atomic/__init__.py", line 3, in <module>
    from .pulp import PulpServer, PulpConfig
  File "/home/rtnpro/workspace/projectatomic/atomic/Atomic/pulp.py", line 2, in <module>
    import requests
ImportError: No module named requests

It seems that this bug got introduced by 1068788

I do not see a way to execute
from Atomic import __version__
without installing requests beforehand. The fix in this pull request to fetch version from a common place seemed to work fine.

Please share your thoughts.

from atomic.

cgwalters avatar cgwalters commented on June 26, 2024

Why not install the requests package on the system? E.g. $pkg install python-requests?

from atomic.

cgwalters avatar cgwalters commented on June 26, 2024

Is there a way we can make python setup.py develop not require pkg_resources at runtime? If not, I think we should stop caring about python setup.py develop. I can see it being handy for websites or whatever, but /usr/bin/atomic should be more integrated with the OS. (Among other things it needs to run as root right now...)

from atomic.

ashcrow avatar ashcrow commented on June 26, 2024

@rtnpro is this still an issue after #180?

from atomic.

cdrage avatar cdrage commented on June 26, 2024

timeouttttt! pinging @rtnpro again, I'll try to catch him on irc :)

from atomic.

rtnpro avatar rtnpro commented on June 26, 2024

@cdrage @ashcrow It should still be a problem because

from Atomic import __version__

will fail. The reason being the imports in https://github.com/cgwalters/atom/blob/6f94706621dce8ccff110febd36639e91dd35f8b/Atomic/__init__.py will try to access the yet uninstalled dependencies. For example, pulp modules will try to look for requests.

from atomic.

rhatdan avatar rhatdan commented on June 26, 2024

Do we still have this issue, or can I close this?

from atomic.

ashcrow avatar ashcrow commented on June 26, 2024

The original error doesn't seem to be, but attempting to import from the repo still doesn't work due to a missing library not in requirements.txt: PyYAML.

from atomic.

rhatdan avatar rhatdan commented on June 26, 2024

@ashcrow PTAL at #538

from atomic.

rhatdan avatar rhatdan commented on June 26, 2024

Fixed in atomic-1.13

from atomic.

Related Issues (20)

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.