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

Ability to bypass setup.py on a per-dependency basis #107

Closed
vbabiy opened this Issue Mar 15, 2011 · 3 comments

Comments

Projects
None yet
1 participant
@vbabiy
Contributor

vbabiy commented Mar 15, 2011

I'm not sure if this is possible, at the very least it's undocumented (as far as I can tell).

A number of our dependencies don't have setup.py files (or have broken setup.py ones), and it would be nice to be able to use these dependencies with pip, either by; using a symlink to the downloaded source, by moving the source into site-packages if symlinking isn't possible (ie windows), or maybe just creating an egg link thing like everything else.

The information for an editable package should be enough to do this (since this contains exactly the same information as our pre-pip requirements format)


@vbabiy

This comment has been minimized.

Show comment
Hide comment
@vbabiy

vbabiy Mar 15, 2011

Contributor

How about forking the dependency, fixing/adding setup.py, and sending them a
pull request? ;-)

An option to ignore setup.py would require pretty significant changes for pip,
afaict; it relies heavily on being able to run "setup.py egg-info" and then
either "setup.py develop" or "setup.py install". In order to make this work
pip would either need to essentially reimplement half-assed versions of one or
the other of those commands outside of setuptools/distutils (seems silly), or
get the same information some other way and generate a replacement setup.py.
Both seem like more work than pip should be doing. But we'll see what Ian has
to say.


Original Comment By: Carl Meyer
Contributor

vbabiy commented Mar 15, 2011

How about forking the dependency, fixing/adding setup.py, and sending them a
pull request? ;-)

An option to ignore setup.py would require pretty significant changes for pip,
afaict; it relies heavily on being able to run "setup.py egg-info" and then
either "setup.py develop" or "setup.py install". In order to make this work
pip would either need to essentially reimplement half-assed versions of one or
the other of those commands outside of setuptools/distutils (seems silly), or
get the same information some other way and generate a replacement setup.py.
Both seem like more work than pip should be doing. But we'll see what Ian has
to say.


Original Comment By: Carl Meyer
@vbabiy

This comment has been minimized.

Show comment
Hide comment
@vbabiy

vbabiy Mar 15, 2011

Contributor

Forking the dependencies is what we have have ended up doing, but ultimately
the issue here is that we're trying to migrate to pip so we can move away from
our nasty hacky solution but we keep stumbling across problems that have never
been an issue until now - issues that are primarily based on pip's lack of
support for modules without setup.py.

I'm quite happy to fork everything to things work, but it's making pip a
harder sell for others on my team. My view is that projects without setup.py
are still perfectly valid python modules, so it should be possible to install
them using an 'ideal' build/distribution tool. But if this isn't in the pip
agenda, that's fine too, I'm not going to be a pain about this.


Original Comment By: andrewingram
Contributor

vbabiy commented Mar 15, 2011

Forking the dependencies is what we have have ended up doing, but ultimately
the issue here is that we're trying to migrate to pip so we can move away from
our nasty hacky solution but we keep stumbling across problems that have never
been an issue until now - issues that are primarily based on pip's lack of
support for modules without setup.py.

I'm quite happy to fork everything to things work, but it's making pip a
harder sell for others on my team. My view is that projects without setup.py
are still perfectly valid python modules, so it should be possible to install
them using an 'ideal' build/distribution tool. But if this isn't in the pip
agenda, that's fine too, I'm not going to be a pain about this.


Original Comment By: andrewingram
@vbabiy

This comment has been minimized.

Show comment
Hide comment
@vbabiy

vbabiy Mar 15, 2011

Contributor

pip is an installer of Python packages that follow standard distribution
techniques -- as defined in distutils. It's not a build tool or bootstrapper
of Python packages nor is it able to automagically guess what a Python module
or package contains or how the deployment story is.

The information of an editable requirement isn't enough since behind the scene
it will still call python setup.py develop and use the metadata contained in
the setup.py.

I know it's a little more work to write setup.py files than just putting
modules on the PYTHONPATH but you'll get dependency tracking, requirements
files, vcs support and uninstallation for free. You just need fix/add setup.py
to the packages you want to install.

For more complex workflows feel free to have a look at Buildout which should
allow you to use setup.py-free packages by using an appropriate recipe.


Original Comment By: Jannis Leidel
Contributor

vbabiy commented Mar 15, 2011

pip is an installer of Python packages that follow standard distribution
techniques -- as defined in distutils. It's not a build tool or bootstrapper
of Python packages nor is it able to automagically guess what a Python module
or package contains or how the deployment story is.

The information of an editable requirement isn't enough since behind the scene
it will still call python setup.py develop and use the metadata contained in
the setup.py.

I know it's a little more work to write setup.py files than just putting
modules on the PYTHONPATH but you'll get dependency tracking, requirements
files, vcs support and uninstallation for free. You just need fix/add setup.py
to the packages you want to install.

For more complex workflows feel free to have a look at Buildout which should
allow you to use setup.py-free packages by using an appropriate recipe.


Original Comment By: Jannis Leidel

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment