`python setup.py bdist_rpm` fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Joe Julian | ||
2.0 |
Fix Released
|
Medium
|
Joe Julian |
Bug Description
I want to create RPM package for my custom Linux configuration. I ran `python setup.py bdist_rpm` (standard python distutils action) but it fails due missing manpage file.
This bug directly related to https:/
For setuptools I wrote hackish workaround, but now problem arise again (for RPM).
There is some problematic points in current setup.py re bdist_rpm.
1) manpage created automatically when someone run `python setup.py build` but this target missed in the case of setuptools.
2) bdist_rpm uses `python setup.py sdist` command to create source tarball first, and this tarball contains only bzrlib-python sources, bzr script, README and setup.py script.
a) I want to note that auto-generated C-extensions sources (from Pyrex code) is not included to sdist tarball, and header file (bzrlib/
b) sdist tarball misses generate_docs.py script and related tools/doc_generate package, therefore building manpage from scratch is impossible. Furthermore, setup.py try to import generate_docs unconditionally and raise ImportError as result.
3) main function setup() try to install manpage conditionally if target is not bdist_eggs. And because previous steps fails, this step fails as well.
To fix this issues we should:
1) Create valid MANIFEST.in to include all required non-python sources and files into sdist tarball
2) Ship bzr-release.tar,gz with manpage inside
3) Make import of generate_docs conditional and catch ImportError
4) Factor out manpage generation from custom build command to build_man subcommand of build to provide compatibility with setuptools and bdist_rpm
We should not put generate_docs.py and tools/doc_generate to sdist tarball, because it's not intended to install to python/
Related branches
- John A Meinel: Approve
-
Diff: 187 lines (+78/-20)7 files modifiedMANIFEST.in (+3/-0)
NEWS (+9/-0)
README_BDIST_RPM (+8/-0)
bzrlib/builtins.py (+19/-15)
bzrlib/tests/blackbox/test_annotate.py (+18/-4)
bzrlib/tests/test_trace.py (+15/-0)
bzrlib/trace.py (+6/-1)
Changed in bzr: | |
assignee: | nobody → Joe Julian (joe-julianfamily) |
milestone: | none → 2.1.0rc1 |
status: | Confirmed → Fix Released |
That sounds like a good plan to me.