Skip to content

Manual pages can no longer be built during the build #302

@tomhughes

Description

@tomhughes

Even with #301 there are still problems building the manual pages as part of distribution packaging with the new build system.

The problem is that the new build system removes the build files after it creates the wheel, but running the make to build the manual pages needs to be able to import osmium.

Basically the package build for Fedora looked like this:

%build
%pyproject_wheel
PYTHONPATH=$PWD/build/lib.%{python3_platform}-cpython-%{python3_version_nodots} %make_build -C docs man


%install
%pyproject_install
%pyproject_save_files osmium
mkdir -p %{buildroot}%{_mandir}/man1
install -p -m644 docs/man/*.1 %{buildroot}%{_mandir}/man1

where the second step in %build is forcing the path to make the newly built osmium module available but that no long works as creating the wheel now cleans those up.

My workaround is to build the documentation as part of the install after the wheel has been unpacked again:

%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files osmium
PYTHONPATH=%{buildroot}%{python3_sitearch} %make_build -C docs man
mkdir -p %{buildroot}%{_mandir}/man1
install -p -m644 docs/man/*.1 %{buildroot}%{_mandir}/man1

but it's a bit naughty to be doing part of the build in the install section :-(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions