Ticket #163 (closed defect: fixed)
Opened 8 years ago
Last modified 7 years ago
RPM package
| Reported by: | daniel | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 0.9 |
| Component: | general | Version: | devel |
| Severity: | normal | Keywords: | install helpwanted |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
Description
setup.py should build RPM (Red Hat Package Manager) packages for 'binary' distribution.
Attachments
Change History
comment:1 Changed 8 years ago by rocky
- Milestone changed from 0.7 to 0.6.1
comment:2 Changed 8 years ago by rocky
Whoops, wiki formatting did a number on my paste. Let me trying pasting setup.cfg again:
[bdist_rpm]
requires = python >= 2.1
subversion-python >= 1.0.0
pysqlite >= 0.4.3
clearsilver >= 0.9.3
httpd
comment:3 Changed 8 years ago by rocky
Ok, on another sidenote, comments should be EDITABLE! :)
Anycase, one more attempt with the formatting (the previous paste was missing an entry).
requires = python >= 2.1
python-xml >= 2.1
subversion-python >= 1.0.0
pysqlite >= 0.4.3
clearsilver >= 0.9.3
httpd
comment:4 Changed 8 years ago by rocky
I checked out branches/0.6-stable (Mar/28/2004 12:45am EST). Here is the 'svn diff' output for fixing the missing MANIFEST.in and adding setup.cfg. Should be no problem applying this diff against main trunk also.
Index: setup.cfg =================================================================== --- setup.cfg (revision 0) +++ setup.cfg (revision 0) @@ -0,0 +1,8 @@ +[bdist_rpm] +requires = python >= 2.1 + python-xml >= 2.1 + subversion-python >= 1.0.0 + pysqlite >= 0.4.3 + clearsilver >= 0.9.3 + httpd + Index: MANIFEST.in =================================================================== --- MANIFEST.in (revision 321) +++ MANIFEST.in (working copy) @@ -1,4 +1,4 @@ -include RELEASE COPYING AUTHORS INSTALL ChangeLog THANKS UPGRADE +include RELEASE COPYING AUTHORS INSTALL ChangeLog THANKS UPGRADE MANIFEST.in setup.cfg include scripts/trac-admin include cgi-bin/trac.cgi recursive-include htdocs *.png *.gif *.js README
comment:5 Changed 8 years ago by jonas
- Resolution set to fixed
- Status changed from new to closed
Patch applied to both trunk and 0.6-stable.
Please test :)
Thanks!
comment:6 Changed 7 years ago by joe@…
- Resolution fixed deleted
- Severity changed from enhancement to normal
- Status changed from closed to reopened
bdist_rpm works but doesn't respect the --fix-python flag, so it can only build for whatever "which python" returns. It should build for whatever python was used to call setup.py. i.e.:
python2.3 setup.py bdist_rpm --fix-python
Should build a package that installs into the "/usr/lib/python2.3" lib directory. Instead, on a Red Hat or Fedora Core 1 system, it drops it into "/usr/lib/python2.3". I have no clue how to fix this, as I thought it was an automagic part of distutils. I've never seen it /not/ work.
comment:7 Changed 7 years ago by daniel
- Milestone changed from 0.6.1 to 0.8
comment:8 Changed 7 years ago by daniel
- Owner changed from jonas to daniel
- Status changed from reopened to new
comment:9 Changed 7 years ago by daniel
- Owner daniel deleted
comment:10 Changed 7 years ago by jonas
- Milestone changed from 0.8 to 0.9
This sound more like a distutils bug than a Trac bug, I don't think we can do anything about this?
Moving to 0.9 until this is verified...
comment:11 Changed 7 years ago by cmlenz
- Keywords install helpwanted added
comment:12 Changed 7 years ago by Mark Rowe <edgewall.com@…>
The following patch should resolve the problem, but it relies on a private distutils API. The API in question hasn't changed in the 5 years since it was added, so it is relatively safe:
Index: setup.py
===================================================================
--- setup.py (revision 1301)
+++ setup.py (working copy)
@@ -179,6 +179,7 @@
for distro in rpm_distros.keys():
r = generic_bdist_rpm(self.dist, distro)
r.initialize_options()
+ self.dist._set_command_options(r, self.dist.command_options['bdist_rpm'])
r.finalize_options()
r.run()
comment:13 Changed 7 years ago by cmlenz
- Resolution set to fixed
- Status changed from new to closed
Patch applied in [1304]. Thanks a lot, Mark!



After discussions on IrcChannel, it was determined this was already available with python's distutils setup. All that is needed is that the sdist command includes MANIFEST.in in the generated tarball.
Also, setting up dependencies for the generated rpm is quite easy. Following is info for setting up a trac rpm that has acceptable Suse 9.0 dependencies (may work on redhat too, unknown at this point).
Simply copy the following text and save it in a file called 'setup.cfg' in the same directory as setup.py.
[bdist_rpm]
requires = python >= 2.1