1 import distutils
.command
.bdist_rpm
as orig
4 from setuptools
import SetuptoolsDeprecationWarning
7 class bdist_rpm(orig
.bdist_rpm
):
9 Override the default bdist_rpm behavior to do the following:
11 1. Run egg_info to ensure the name and version are properly calculated.
12 2. Always run 'install' using --single-version-externally-managed to
13 disable eggs in RPM distributions.
18 "bdist_rpm is deprecated and will be removed in a future "
19 "version. Use bdist_wheel (wheel packages) instead.",
20 SetuptoolsDeprecationWarning
,
23 # ensure distro name is up-to-date
24 self
.run_command('egg_info')
26 orig
.bdist_rpm
.run(self
)
28 def _make_spec_file(self
):
29 spec
= orig
.bdist_rpm
._make
_spec
_file
(self
)
33 "setup.py install --single-version-externally-managed "
36 "%setup -n %{name}-%{unmangled_version}"