Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing Blocks by Running setup.py #376

Closed
rizar opened this issue Feb 27, 2015 · 8 comments
Closed

Installing Blocks by Running setup.py #376

rizar opened this issue Feb 27, 2015 · 8 comments

Comments

@rizar
Copy link
Contributor

rizar commented Feb 27, 2015

I did not find an instruction on how to install Blocks from a cloned repo by running setup.py. Simply running it does not work:

╰─$ python setup.py develop --user                     
running develop
running egg_info
writing requirements to blocks.egg-info/requires.txt
writing blocks.egg-info/PKG-INFO
writing top-level names to blocks.egg-info/top_level.txt
writing dependency_links to blocks.egg-info/dependency_links.txt
reading manifest file 'blocks.egg-info/SOURCES.txt'
writing manifest file 'blocks.egg-info/SOURCES.txt'
running build_ext
Creating /home/rizar/.local/lib/python2.7/site-packages/blocks.egg-link (link to .)
blocks 0.1a1 is already the active version in easy-install.pth
Installing blocks-continue script to /home/rizar/.local/bin
Installing blocks-dump script to /home/rizar/.local/bin
Installing blocks-plot script to /home/rizar/.local/bin

Installed /home/rizar/Dist/blocks
Processing dependencies for blocks==0.1a1
Searching for fuel
Reading https://pypi.python.org/simple/fuel/
Couldn't find index page for 'fuel' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
@bartvm
Copy link
Member

bartvm commented Feb 27, 2015

pip install . -r requirements.txt is what you need. The problem is that we rely on both fuel and picklable-itertools which aren't on PyPI. setup.py does not provide any way to provide alternative sources (like GitHub repos), so that's why you need pip to process requirements.txt.

@bartvm
Copy link
Member

bartvm commented Feb 27, 2015

Oh, and if you want to install in development mode without root access, something pip install . -e -r requirements.txt --user should work.

@rizar
Copy link
Contributor Author

rizar commented Feb 27, 2015

Thanks! It works nice, I will add it to the docs.

The correct command is pip install -r requirements.txt --user -e .

@madisonmay
Copy link

It should actually be possible to configure setup.py to pull packages from github as opposed to PyPI.
http://www.scotttorborg.com/python-packaging/dependencies.html#packages-not-on-pypi

@bartvm
Copy link
Member

bartvm commented Feb 28, 2015

That's deprecated I'm afraid, and might be removed in the future. In some versions of pip it also results in a whole bunch of warnings, and the need to pass switches like --allow-external.

This is a pretty nice blogpost from one of the pip developers describing the relationship between setup.py and requirements.txt (the first one being abstract, the second one concrete), which is what I'm following: https://caremad.io/2013/07/setup-vs-requirement/

@madisonmay
Copy link

Huh, thanks for the explanation. I can't find anything about dependency_links being deprecated (the setuptools docs don't seem to mention it), but the rationale explained in the caremade.io blogpost makes sense.

@bartvm
Copy link
Member

bartvm commented Mar 1, 2015

Oh, I meant deprecated by pip. Support was actually briefly removed in pypa/pip#1519, but later re-introduced in pypa/pip#1955. Not sure what the future plans are now, but it's definitely still considered bad practice I think.

@madisonmay
Copy link

Ah gotcha -- thanks for the clarification.

@bartvm bartvm closed this as completed Mar 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants