|
1 | 1 | Vendor: Microsoft Corporation |
2 | 2 | Distribution: Azure Linux |
3 | 3 | %global pypi_name semantic_version |
| 4 | +%global srcname python-semanticversion |
4 | 5 |
|
5 | 6 | Name: python-%{pypi_name} |
6 | | -Version: 2.8.4 |
7 | | -Release: 4%{?dist} |
| 7 | +Version: 2.10.0 |
| 8 | +Release: 1%{?dist} |
8 | 9 | Summary: Library implementing the 'SemVer' scheme |
9 | 10 |
|
10 | 11 | License: BSD |
11 | 12 | URL: https://github.com/rbarrois/python-semanticversion |
12 | | -Source0: %{url}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz |
| 13 | +Source: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz |
| 14 | + |
13 | 15 | BuildArch: noarch |
| 16 | +BuildRequires: make |
| 17 | +BuildRequires: python3-devel |
| 18 | +BuildRequires: python3-pytest |
| 19 | +BuildRequires: python3dist(wheel) |
| 20 | +BuildRequires: python3dist(pytest-mock) |
| 21 | +BuildRequires: python3-pip |
| 22 | +BuildRequires: python3-sphinx |
| 23 | +BuildRequires: python3dist(sphinx-rtd-theme) |
| 24 | +BuildRequires: python3-sphinxcontrib-jquery |
| 25 | +BuildRequires: sed |
14 | 26 |
|
15 | | -%global _description \ |
16 | | -This small python library provides a few tools to handle semantic versioning\ |
17 | | -in Python. |
| 27 | +%global _description %{expand: |
| 28 | +This small python library provides a few tools to handle semantic versioning in |
| 29 | +Python.} |
18 | 30 |
|
19 | 31 | %description %{_description} |
20 | 32 |
|
21 | 33 | %package -n python3-%{pypi_name} |
22 | 34 | Summary: %{summary} |
23 | | -BuildRequires: python3-devel |
24 | | -BuildRequires: python3-setuptools |
25 | | -#BuildRequires: python3-django |
26 | | -%{?python_provide:%python_provide python3-%{pypi_name}} |
27 | 35 |
|
28 | 36 | %description -n python3-%{pypi_name} %{_description} |
29 | 37 |
|
30 | | -Python 3 version |
31 | | - |
32 | 38 | %package doc |
33 | 39 | Summary: Documentation for python-%{pypi_name} |
34 | | -BuildRequires: python3-sphinx |
35 | | -BuildRequires: python3-sphinx_rtd_theme |
36 | 40 |
|
37 | 41 | %description doc |
38 | 42 | %{summary}. |
39 | 43 |
|
40 | 44 | %prep |
41 | | -%autosetup -n semantic_version-%{version} |
42 | | -# Remove bundled egg-info |
43 | | -rm -rf %{pypi_name}.egg-info |
44 | | -# documentation builds due to broken symlink |
45 | | -# https://github.com/rbarrois/python-semanticversion/issues/20 |
46 | | -rm docs/credits.rst |
| 45 | +%autosetup -p1 -n %{srcname}-%{version} |
| 46 | + |
| 47 | +# Drop unnecessary dependency |
| 48 | +sed -i '/zest\.releaser\[recommended\]/d' setup.cfg |
| 49 | + |
| 50 | +%generate_buildrequires |
| 51 | +%pyproject_buildrequires -x doc |
47 | 52 |
|
48 | 53 | %build |
49 | | -%py3_build |
| 54 | +%pyproject_wheel |
50 | 55 | # generate html docs |
51 | | -sphinx-build-%{python3_version} docs html |
| 56 | +make -C docs html |
52 | 57 | # remove the sphinx-build leftovers |
53 | | -rm -rf html/.{doctrees,buildinfo} |
| 58 | +rm -rf docs/_build/html/.{doctrees,buildinfo} |
54 | 59 |
|
55 | 60 | %install |
56 | | -%py3_install |
| 61 | +%pyproject_install |
| 62 | +%pyproject_save_files %{pypi_name} |
57 | 63 |
|
58 | 64 | %check |
59 | | -# Seems like it's just stuck in koji |
60 | | -#{__python3} setup.py test |
61 | | - |
62 | | -%files -n python3-%{pypi_name} |
| 65 | +%pytest |
| 66 | +%files -n python3-%{pypi_name} -f %{pyproject_files} |
63 | 67 | %license LICENSE |
64 | | -%doc README.rst ChangeLog |
65 | | -%{python3_sitelib}/%{pypi_name}/ |
66 | | -%{python3_sitelib}/%{pypi_name}-*.egg-info/ |
| 68 | +%doc README.rst ChangeLog CREDITS |
67 | 69 |
|
68 | 70 | %files doc |
69 | 71 | %license LICENSE |
70 | | -%doc html |
| 72 | +%doc docs/_build/html |
71 | 73 |
|
72 | 74 | %changelog |
| 75 | +* Mon Feb 17 2025 Sumit Jena <v-sumitjena@microsoft.com> - 2.10.0-1 |
| 76 | +- Update to version 2.10.0 |
| 77 | +- License verified |
| 78 | + |
73 | 79 | * Fri Oct 15 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 2.8.4-4 |
74 | 80 | - Initial CBL-Mariner import from Fedora 32 (license: MIT). |
75 | 81 |
|
|
0 commit comments