#18 Add bcond for documentation building
Merged 2 months ago by cstratak. Opened 3 months ago by salimma.
rpms/ salimma/python-twine for-epel9  into  rawhide

file modified
+23 -5
@@ -1,11 +1,12 @@ 

  %global srcname twine

  

  %bcond_without tests

+ %bcond_without docs

  %bcond_with internet

  

  Name:           python-%{srcname}

  Version:        4.0.2

- Release:        3%{?dist}

+ Release:        4%{?dist}

  Summary:        Collection of utilities for interacting with PyPI

  

  License:        ASL 2.0
@@ -32,9 +33,12 @@ 

  BuildRequires:  python3dist(pretend)

  BuildRequires:  python3dist(pytest)

  BuildRequires:  python3dist(pytest-cov)

+ %if %{with docs}

  # Doc (manpage) deps

  BuildRequires:  python3dist(sphinx)

  BuildRequires:  python3dist(sphinxcontrib-programoutput)

+ %endif

+ # with docs

  %if %{with internet}

  # pytest-services and pytest-socket are not packaged yet

  #BuildRequires:  python3dist(pytest-services)
@@ -42,9 +46,11 @@ 

  BuildRequires:  gcc

  BuildRequires:  libffi-devel

  BuildRequires:  git-core

- %endif # with internet

+ %endif

+ # with internet

  

- %endif # with tests

+ %endif

+ # with tests

  

  Obsoletes:      python2-%{srcname} < 1.12.2-3

  Obsoletes:      python3-%{srcname} < 1.12.2-3
@@ -65,13 +71,17 @@ 

  

  %build

  %pyproject_wheel

+ %if %{with docs}

  PYTHONPATH=$PWD sphinx-build-3 -b man docs/ docs/build/man -c docs/

  rm -r docs/build/man/.doctrees

+ %endif

  

  %install

  %pyproject_install

  %pyproject_save_files twine

+ %if %{with docs}

  install -p -D -T -m 0644 docs/build/man/%{srcname}.1 %{buildroot}%{_mandir}/man1/%{srcname}.1

+ %endif

  

  %if %{with tests}

  %check
@@ -79,17 +89,25 @@ 

  %if %{without internet}

        --deselect tests/test_integration.py \

        --deselect tests/test_upload.py::test_check_status_code_for_wrong_repo_url \

- %endif # without internet

+ %endif

  ;

- %endif # with tests

+ # without internet

+ %endif

+ # with tests

  

  %files -n %{srcname} -f %{pyproject_files}

  %license LICENSE

  %doc README.rst AUTHORS

+ %if %{with docs}

  %{_mandir}/man1/%{srcname}.1*

+ %endif

  %{_bindir}/twine

  

  %changelog

+ * Thu Feb 29 2024 Michel Lind <salimma@fedoraproject.org> - 4.0.2-4

+ - Add bcond for documentation building

+ - Fix warnings when regenerating the RPM by moving post-endif comments to new lines

+ 

  * Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.2-3

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

  

Also fix warnings when regenerating the RPM by moving post-endif comments to new lines

Signed-off-by: Michel Lind salimma@fedoraproject.org

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/7e27a93e508743af89e0b046620cd326

I would prefer to keep this in the epel9 branch. WDYT @cstratak?

Thanks! Do you have an EPEL9 build utilizing the SPEC? (for verification basically).

I would prefer to keep this in the epel9 branch. WDYT @cstratak?

No strong preference, but yeah, the SPEC would be cleaner that way. @salimma would you like me to provide ACL's for the EPEL9 branch?

I think having a docs bcond is useful regardless. Is your issue that the EPEL conditional takes up too much space (we could use the more concise %bcond syntax) or that you don't want a docs bcond at all?

I am OK with having a conditional.
But I am less happy about 0%{?rhel} && 0%{?rhel} <= 9 in the spec. This is a branch for the future, not for the past. Having it shorter would certainly help, perhaps it can always be disabled in RHEL?

The plan for EL 9 is to keep it stable, The plan for rawhide is to keep rebasing and updating. EPEL 9 specific changes like test_fails_rst_syntax_error will become out of date and when we update this package in Fedora, we are unlikely to check if it still applies on EPEL 9.

Thanks! Do you have an EPEL9 build utilizing the SPEC? (for verification basically).

I have a local build, so yeah, I can update this PR to only define the conditional, and then carry the delta in the epel9 branch

@cstratak I already have access via the Python packagers SIG and EPEL packagers SIG, thanks!

rebased onto d3c392e

2 months ago

Updated to only include the new bcond and cleaning up the warnings for '%endif # comment'

PS the epel9 build is still only local because python-pretend is not branched yet, see deps in https://bugzilla.redhat.com/show_bug.cgi?id=2116984

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/667605b0beda4395b42e47cbbe571a9e

I already have access via the Python packagers SIG and EPEL packagers SIG, thanks!

Please don't branch and build packages in epel if you only have access via those two SIGs. Somebody needs to take responsibility for the package in epel if we want to build it there.

I already have access via the Python packagers SIG and EPEL packagers SIG, thanks!

Please don't branch and build packages in epel if you only have access via those two SIGs. Somebody needs to take responsibility for the package in epel if we want to build it there.

happy to be added directly then. IIRC the branch request was made and @cstratak added the SIG, so - do add me and set the rhbz assignee to me (salimma). Thanks!

Also need to rename this PR since it does not reflect the current commit

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/bc47d2381015439fb44d8a72bf349015

The last message fell through the cracks for a bit, I've added you as an EPEL maintainer.

Pull-Request has been merged by cstratak

2 months ago
Metadata