aboutsummaryrefslogtreecommitdiff
path: root/venv/lib/python3.8/site-packages/setuptools/command/bdist_rpm.py
diff options
context:
space:
mode:
authorsotech117 <michael_foiani@brown.edu>2025-07-31 17:27:24 -0400
committersotech117 <michael_foiani@brown.edu>2025-07-31 17:27:24 -0400
commit5bf22fc7e3c392c8bd44315ca2d06d7dca7d084e (patch)
tree8dacb0f195df1c0788d36dd0064f6bbaa3143ede /venv/lib/python3.8/site-packages/setuptools/command/bdist_rpm.py
parentb832d364da8c2efe09e3f75828caf73c50d01ce3 (diff)
add code for analysis of data
Diffstat (limited to 'venv/lib/python3.8/site-packages/setuptools/command/bdist_rpm.py')
-rw-r--r--venv/lib/python3.8/site-packages/setuptools/command/bdist_rpm.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/venv/lib/python3.8/site-packages/setuptools/command/bdist_rpm.py b/venv/lib/python3.8/site-packages/setuptools/command/bdist_rpm.py
new file mode 100644
index 0000000..0eb1b9c
--- /dev/null
+++ b/venv/lib/python3.8/site-packages/setuptools/command/bdist_rpm.py
@@ -0,0 +1,31 @@
+import distutils.command.bdist_rpm as orig
+
+
+class bdist_rpm(orig.bdist_rpm):
+ """
+ Override the default bdist_rpm behavior to do the following:
+
+ 1. Run egg_info to ensure the name and version are properly calculated.
+ 2. Always run 'install' using --single-version-externally-managed to
+ disable eggs in RPM distributions.
+ """
+
+ def run(self):
+ # ensure distro name is up-to-date
+ self.run_command('egg_info')
+
+ orig.bdist_rpm.run(self)
+
+ def _make_spec_file(self):
+ spec = orig.bdist_rpm._make_spec_file(self)
+ spec = [
+ line.replace(
+ "setup.py install ",
+ "setup.py install --single-version-externally-managed "
+ ).replace(
+ "%setup",
+ "%setup -n %{name}-%{unmangled_version}"
+ )
+ for line in spec
+ ]
+ return spec