diff --git a/.config/subprocess-tee.spec b/.config/subprocess-tee.spec new file mode 100644 index 0000000..617ec1b --- /dev/null +++ b/.config/subprocess-tee.spec @@ -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 diff --git a/.gitignore b/.gitignore index b4f5db5..2b9db0d 100644 --- a/.gitignore +++ b/.gitignore @@ -125,3 +125,4 @@ dmypy.json # Pyre type checker .pyre/ +*.rpm diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000..4d23a95 --- /dev/null +++ b/.packit.yaml @@ -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