diff options
author | PJ Eby <distutils-sig@python.org> | 2005-09-03 04:51:27 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2005-09-03 04:51:27 +0000 |
commit | 78e2272d52969e26af767e0cbfadeaefebe84657 (patch) | |
tree | b113c723681c76bfe28c9686d76aae34d333fd19 /setuptools/command/bdist_rpm.py | |
parent | 66e825818b0c13c0ef28008df1dd6fa0477b2bb5 (diff) | |
download | external_python_setuptools-78e2272d52969e26af767e0cbfadeaefebe84657.tar.gz external_python_setuptools-78e2272d52969e26af767e0cbfadeaefebe84657.tar.bz2 external_python_setuptools-78e2272d52969e26af767e0cbfadeaefebe84657.zip |
Added support for old-style RPMs (i.e. non-egg RPMs)
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041238
Diffstat (limited to 'setuptools/command/bdist_rpm.py')
-rwxr-xr-x | setuptools/command/bdist_rpm.py | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/setuptools/command/bdist_rpm.py b/setuptools/command/bdist_rpm.py index 004419ce..2cc3fb18 100755 --- a/setuptools/command/bdist_rpm.py +++ b/setuptools/command/bdist_rpm.py @@ -1,11 +1,33 @@ # This is just a kludge so that bdist_rpm doesn't guess wrong about the -# distribution name and version, if the egg_info command is going to alter them +# distribution name and version, if the egg_info command is going to alter +# them, and another kludge to allow you to build old-style non-egg RPMs from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm class bdist_rpm(_bdist_rpm): + user_options = _bdist_rpm.user_options + [ + ('no-egg', None, "Don't install as an egg (may break the package!)") + ] + + boolean_options = _bdist_rpm.boolean_options + ['no-egg'] + + def initialize_options(self): + _bdist_rpm.initialize_options(self) + self.no_egg = None + def run(self): self.run_command('egg_info') # ensure distro name is up-to-date _bdist_rpm.run(self) + def _make_spec_file(self): + spec = _bdist_rpm._make_spec_file(self) + if not self.no_egg: + return spec + + # Hack the spec file so that we install old-style + return [ + line.replace( + "setup.py install ","setup.py install --old-and-unmanageable " + ) for line in spec + ] |