setuptools --no-dependencies option needed?
Hello, I'm wondering if a --no-dependencies option would be useful. In Gentoo we edit every setup.py file that has install_requires, setup_requires, or extra_requires and remove that with sed or a patch because our package manager takes care of installing all dependencies and because users may already have packages installed previously without setuptools (in python 2.4). We've found that can cause problems[1] and are considering using --single-version-externally-managed, but ideally we'd like to use the full features of setuptools (without losing the ability to install multiple versions, require-ing specific versions etc.). Would an option similar to --single-version-externally-managed that simply doesn't check for installed dependencies and does not try to download and install any dependencies be possible? Rob [1] http://bugs.gentoo.org/show_bug.cgi?id=183977
At 09:43 AM 7/2/2007 -0700, Rob Cakebread wrote:
Hello,
I'm wondering if a --no-dependencies option would be useful. In Gentoo we edit every setup.py file that has install_requires, setup_requires, or extra_requires and remove that with sed or a patch because our package manager takes care of installing all dependencies and because users may already have packages installed previously without setuptools (in python 2.4).
We've found that can cause problems[1] and are considering using --single-version-externally-managed, but ideally we'd like to use the full features of setuptools (without losing the ability to install multiple versions, require-ing specific versions etc.).
Would an option similar to --single-version-externally-managed that simply doesn't check for installed dependencies and does not try to download and install any dependencies be possible?
use "setup.py easy_install . --no-deps"
Phillip J. Eby wrote:
use "setup.py easy_install . --no-deps"
We've tried that but it fails because we need to install to our sandbox directory first. Currently we use this, so we need to be able to specify the root with your example: python setup.py install --root=${D} I've tried every combination of setuptools options I can think of (-d, -s, --prefix, -S) but it always fails with permission errors trying to write to the root filesystem: error: can't create or remove files in install directory [Errno 13] Permission denied: '/usr/lib/python2.5/site-packages/test-easy-install-4486.write-test' Thanks, Rob
At 08:33 AM 7/3/2007 -0700, Rob Cakebread wrote:
Phillip J. Eby wrote:
use "setup.py easy_install . --no-deps"
We've tried that but it fails because we need to install to our sandbox directory first. Currently we use this, so we need to be able to specify the root with your example:
python setup.py install --root=${D}
I'm confused. If you're specifying "install --root", you should be getting --single-version-externally-managed, which means that dependencies shouldn't be being installed in the first place. What exactly is the problem again?
Phillip J. Eby wrote:
At 08:33 AM 7/3/2007 -0700, Rob Cakebread wrote:
Phillip J. Eby wrote:
use "setup.py easy_install . --no-deps"
We've tried that but it fails because we need to install to our sandbox directory first. Currently we use this, so we need to be able to specify the root with your example:
python setup.py install --root=${D}
I'm confused. If you're specifying "install --root", you should be getting --single-version-externally-managed, which means that dependencies shouldn't be being installed in the first place.
Ah ha, I didn't know that was changed (in setuptools 0.6a11). The problem was for packages like elementtree and python 2.4, when their setup.py used distutils. So, that is not an issue since 0.6a11, great. There is one minor problem which will only happen when we miss a dependency. If a package has test_requires it will try to download and install packages when we run setup.py test. For instance in rdflib it will try to install nose. It would be nice to be able to make it abort instead, but that's not a big deal like install_requires pre-0.6a11 Thanks again, Rob
At 12:46 PM 7/3/2007 -0700, Rob Cakebread wrote:
There is one minor problem which will only happen when we miss a dependency. If a package has test_requires it will try to download and install packages when we run setup.py test. For instance in rdflib it will try to install nose.
It would be nice to be able to make it abort instead, but that's not a big deal like install_requires pre-0.6a11
Well, you can configure "--allow-hosts=localhost" for easy_install, e.g. by putting this in an appropriate distutils .cfg file: [easy_install] allow_hosts = localhost And then it won't download. However, I'm not sure if this is really a problem. Any eggs that get downloaded for tests aren't actually installed; they're just dumped in the setup.py directory and added to sys.path during the test run. They don't get installed with the package.
participants (2)
-
Phillip J. Eby
-
Rob Cakebread