-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# spell-checker:ignore bcond pkgversion buildrequires autosetup PYTHONPATH noarch buildroot bindir sitelib numprocesses clib | ||
%bcond_with check | ||
%bcond_with privileged_tests | ||
#global source_date_epoch_from_changelog 0 | ||
#global clamp_mtime_to_source_date_epoch 1 | ||
|
||
Name: subprocess-tee | ||
Version: VERSION_PLACEHOLDER | ||
Release: 1%{?dist} | ||
Summary: subprocess-tee | ||
|
||
License: MIT | ||
URL: https://github.com/pycontribs/subprocess-tee | ||
Source0: %{pypi_source} | ||
|
||
BuildArch: noarch | ||
|
||
BuildRequires: pyproject-rpm-macros | ||
BuildRequires: python%{python3_pkgversion}-build | ||
BuildRequires: python%{python3_pkgversion}-pip | ||
BuildRequires: python%{python3_pkgversion}-setuptools | ||
BuildRequires: python%{python3_pkgversion}-setuptools_scm | ||
BuildRequires: python%{python3_pkgversion}-wheel | ||
BuildRequires: python%{python3_pkgversion}-devel | ||
%if %{with check} | ||
# These are required for tests: | ||
BuildRequires: python%{python3_pkgversion}-pytest | ||
BuildRequires: python%{python3_pkgversion}-pytest-xdist | ||
BuildRequires: git-core | ||
%endif | ||
|
||
|
||
%description | ||
subprocess-tee | ||
|
||
|
||
%prep | ||
%autosetup | ||
|
||
|
||
%build | ||
%pyproject_wheel | ||
|
||
|
||
%generate_buildrequires | ||
%pyproject_buildrequires | ||
|
||
|
||
%install | ||
%pyproject_install | ||
%pyproject_save_files subprocess_tee | ||
|
||
%check | ||
%if %{with check} | ||
pytest \ | ||
-v \ | ||
--disable-pytest-warnings \ | ||
--numprocesses=auto \ | ||
test | ||
%endif | ||
|
||
|
||
%files -f %{pyproject_files} | ||
%license LICENSE | ||
%doc README.md | ||
|
||
%changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,3 +125,4 @@ dmypy.json | |
|
||
# Pyre type checker | ||
.pyre/ | ||
*.rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
# spell-checker:ignore packit specfile copr epel | ||
# https://packit.dev/docs/configuration/ | ||
# TODO(ssbarnea): Is there a way to template the package name in order to make | ||
# it easier to sync this config between projects? | ||
specfile_path: dist/subprocess-tee.spec | ||
actions: | ||
create-archive: | ||
- python3 -m build --sdist --outdir dist | ||
- sh -c "ls dist/subprocess-tee-*.tar.gz" | ||
get-current-version: | ||
- python3 -m setuptools_scm --strip-dev | ||
post-upstream-clone: | ||
- bash -c "rm -f *.src.rpm && rm -rf dist/*.*" | ||
- mkdir -p dist | ||
- bash -c 'sed -e "s/VERSION_PLACEHOLDER/$(python3 -m setuptools_scm --strip-dev)/" .config/subprocess-tee.spec > dist/subprocess-tee.spec' | ||
srpm_build_deps: | ||
- python3-build | ||
- python3-setuptools_scm | ||
jobs: | ||
- job: copr_build | ||
targets: | ||
# See https://packit.dev/docs/configuration/#aliases | ||
# API to get available targets: https://api.dev.testing-farm.io/v0.1/composes/public | ||
# Fedora 37 is the first version having a setuptools(-scm) that supports our PEP-621 metadata | ||
- fedora-37 | ||
- fedora-rawhide | ||
trigger: pull_request | ||
# - job: tests | ||
# trigger: pull_request | ||
# metadata: | ||
# targets: | ||
# - fedora-all | ||
# - job: propose_downstream | ||
# trigger: release | ||
# metadata: | ||
# dist-git-branch: master |