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-03 14:06:44 +0000 |
commit | b4a0c62c24f332dc0b7849f8e4b6675552d1203c (patch) | |
tree | fbdb3b6884784cf902b71a899cdc373e09344fba /setuptools/command/egg_info.py | |
parent | 2c33dad04fd11ebd7fc8e15d0017ff2dc617e6a3 (diff) | |
download | external_python_setuptools-b4a0c62c24f332dc0b7849f8e4b6675552d1203c.tar.gz external_python_setuptools-b4a0c62c24f332dc0b7849f8e4b6675552d1203c.tar.bz2 external_python_setuptools-b4a0c62c24f332dc0b7849f8e4b6675552d1203c.zip |
Make egg_info command write out setup requirements
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( [ |