Skip to content

Commit 6957453

Browse files
authored
Merge pull request #118 from jscotka/new_spec
repair specfile to be same as possible as in ogr and packit.yaml fix
2 parents 08b92a9 + 0e2892b commit 6957453

File tree

2 files changed

+57
-40
lines changed

2 files changed

+57
-40
lines changed

.packit.yaml

Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,47 @@
1-
specfile_path: python-requre.spec
1+
---
2+
specfile_path: fedora/python-requre.spec
23
synced_files:
3-
- python-requre.spec
4-
- .packit.yaml
5-
# package project name what correspond to package name in setup.py
6-
upstream_package_name: requre
7-
# name what you used as name in specfile (for python packages it starts with python-)
4+
- fedora/changelog
5+
# https://packit.dev/docs/configuration/#top-level-keys
86
downstream_package_name: python-requre
9-
7+
upstream_project_url: https://github.com/packit/requre
8+
# we are setting this so we can use packit from requre's dist-git
9+
# packit can't know what's the upstream name when running from distgit
10+
upstream_package_name: requre
1011
actions:
12+
# we need this b/c `git archive` doesn't put all the metadata in the tarball:
13+
# LookupError: setuptools-scm was unable to detect version for '/builddir/build/BUILD/requre-0.11.1'.
14+
# Make sure you're either building from a fully intact git repository or PyPI tarballs.
1115
create-archive:
12-
- "python3 setup.py sdist --dist-dir ."
13-
- "sh -c 'echo requre-$(python3 setup.py --version).tar.gz'"
14-
get-current-version:
15-
- "python3 setup.py --version"
16-
16+
- python3 setup.py sdist --dist-dir ./fedora/
17+
- bash -c "ls -1t ./fedora/*.tar.gz | head -n 1"
18+
get-current-version: python3 setup.py --version
1719
jobs:
18-
- job: tests
20+
- job: sync_from_downstream
21+
trigger: commit
22+
- job: propose_downstream
23+
trigger: release
24+
metadata:
25+
dist_git_branches: fedora-all
26+
- job: copr_build
1927
trigger: pull_request
28+
metadata:
29+
targets:
30+
- fedora-all
31+
- job: copr_build
32+
trigger: commit
33+
metadata:
34+
branch: master
35+
targets:
36+
- fedora-stable
37+
project: packit-master
38+
list_on_homepage: True
39+
preserve_project: True
40+
- job: copr_build
41+
trigger: release
2042
metadata:
2143
targets:
2244
- fedora-stable
45+
project: packit-releases
46+
list_on_homepage: True
47+
preserve_project: True
Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
# Created by pyp2rpm-3.3.3
2-
%global pypi_name requre
1+
%global srcname requre
32

4-
Name: python-%{pypi_name}
5-
Version: 0.2.4
3+
Name: python-%{srcname}
4+
Version: 0.4.0
65
Release: 1%{?dist}
76
Summary: Python library what allows re/store output of various objects for testing
87

98
License: MIT
10-
URL: https://github.com/packit-service/requre
9+
URL: https://github.com/packit/requre
1110
Source0: %{pypi_source}
1211
BuildArch: noarch
1312

@@ -26,46 +25,39 @@ REQUest REcordingRequre [rekure] - Is Library for storing output of various
2625
function and methods to persistent storage and be able to replay the stored
2726
output to functions.
2827

29-
%package -n python3-%{pypi_name}
28+
%package -n python3-%{srcname}
3029
Summary: %{summary}
31-
%{?python_provide:%python_provide python3-%{pypi_name}}
3230

33-
%description -n python3-%{pypi_name}
31+
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_provides
32+
%if 0%{?fedora} < 33
33+
%{?python_provide:%python_provide python3-%{srcname}}
34+
%endif
35+
36+
%description -n python3-%{srcname}
3437
REQUest REcordingRequre [rekure] - Is Library for storing output of various
3538
function and methods to persistent storage and be able to replay the stored
3639
output to functions.
3740

38-
%package -n python-%{pypi_name}-doc
39-
Summary: requre documentation
40-
%description -n python-%{pypi_name}-doc
41-
Documentation for requre
42-
43-
%check
44-
make check
45-
4641
%prep
47-
%autosetup -n %{pypi_name}-%{version}
48-
rm -rf %{pypi_name}.egg-info
42+
%autosetup -n %{srcname}-%{version}
43+
# Remove bundled egg-info
44+
rm -rf %{srcname}.egg-info
4945

5046
%build
5147
%py3_build
52-
PYTHONPATH=${PWD} sphinx-build-3 docs html
53-
rm -rf html/.{doctrees,buildinfo}
5448

5549
%install
5650
%py3_install
5751

58-
%files -n python3-%{pypi_name}
52+
%files -n python3-%{srcname}
5953
%license LICENSE
6054
%doc README.md
6155
%{_bindir}/requre-patch
62-
%{python3_sitelib}/%{pypi_name}/
63-
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/
64-
65-
%files -n python-%{pypi_name}-doc
66-
%doc html
67-
%license LICENSE
56+
%{python3_sitelib}/%{srcname}
57+
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info
6858

6959
%changelog
60+
* Wed Sep 22 2020 Jan Ščotka <[email protected]> - 0.4.0-1
61+
- New upstream release 0.4.0
7062
* Wed Jan 15 2020 Jan Ščotka <[email protected]> - 0.2.0-1
7163
- Initial package.

0 commit comments

Comments
 (0)