Closed mcyprian closed 9 years ago
I think it is enough to generate documentation with sphinx only once (if available ofc), also it should be moved to %build
or %install
phase of the specfile.
So if sphinx is available -
generate documentation only once (using sphinx-build or sphinx-build-3 based on base python interpret in specfile)
move it to %build
or %install
phase
create subpackage python-foo-doc which will ship docs generated by sphinx
cc @bkabrda for opinion
running ./mybin.py devassistant -b 3
pyp2rpm finds following binary files %{_bindir}/python3-da %{_bindir}/python3-da-gui %{_bindir}/python3-devassistant %{_bindir}/python3-devassistant-gui
these shoud be without python3-
prefix.
How executables should be treated:
when pyp2rpm is run without additional parameters (both python3 and python2 subpackage is created and python2 is base python), assume we have executable foo:
foo
, foo-2
, foo-2.7
should be packaged under python2 subpackage
foo-3
, foo-3.4
should be packaged under python3 subpackage
when pyp2rpm is run with -b 3 (only python3 subpackage is generated and also python3 is base python)
foo
, foo-3
, foo-3.4
should be packaged under python3 subpackage
when pyp2rpm is run with -b 3 -p 2 (both python3 and python2 subpackage is created and python3 is base python)
foo-2
, foo-2.7
should be packaged under python2 subpackage
foo
, foo-3
, foo-3.4
should be packaged under python3 subpackage
-X.Y
version can be generated by %{pythonX-version}
macro
I think it is enough to generate documentation with sphinx only once (if available ofc), also it should be moved to %install phase of the specfile.
Wouldn't %build be more appropriate, given that you're building docs?
Wouldn't %build be more appropriate, given that you're building docs?
I agree, %build
seems much more reasonable place for building docs.
Sphinx build moved to %build section as you recommended, executable naming updated. I've found out that variable data.scripts was map object instead of list, what was the reason of behavior mentioned in issue #16, so I've fixed it as well.
One more thing, Requires are duplicated between main package and subpackage which carries python version marked as base.
Packaging Python guidelines now recommends to build both python2 and python3 versions in the same directory and to use new %py2_build and %py2_install macros. This PR adds new fedora template and moves the old to file fedora_subdirs.spec.