diff options
author | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-11-03 14:06:44 +0000 |
---|---|---|
committer | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-11-18 17:58:39 +0000 |
commit | 0aa6a4de5931d02876428388678802db2371fd37 (patch) | |
tree | 9e2a7395fda4799d04e2b2ee7d61d999ae4d6709 /setuptools/command/egg_info.py | |
parent | 48ff92b20b5c1a200c6790d6cda6fc9670d67804 (diff) | |
download | python-setuptools-bitbucket-baserock/master.tar.gz |
Make egg_info command write out setup requirementsbaserock/richardipsum/pip-7.0-rebasebaserock/master
This commit makes the egg_info command write out setup requirements as well
as install requirements, setup requirements are written to a
setup_requires.txt file.
The commit adds a new function write_setup_requirements which uses the
existing _write_requirements function to write setup requirements out to a file
and adds a new entry point to the egg_info.writers group.
Diffstat (limited to 'setuptools/command/egg_info.py')
-rwxr-xr-x | setuptools/command/egg_info.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 06764a17..78d86981 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -382,6 +382,12 @@ def write_requirements(cmd, basename, filename): cmd.write_or_delete_file("requirements", filename, data.getvalue()) +def write_setup_requirements(cmd, basename, filename): + data = StringIO() + _write_requirements(data, cmd.distribution.setup_requires) + cmd.write_or_delete_file("setup-requirements", filename, data.getvalue()) + + def write_toplevel_names(cmd, basename, filename): pkgs = dict.fromkeys( [ |