## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec %bcond_without tests Name: hatch Version: 1.0.0~rc16 Release: %autorelease Summary: A modern project, package, and virtual env manager License: MIT URL: https://github.com/ofek/hatch %global srcversion %(echo '%{version}' | tr -d '~') %global tag hatch-v%{srcversion} Source0: %{url}/archive/%{tag}/hatch-%{srcversion}.tar.gz # Cannot use %%pyproject_buildrequires -r (the default) with hatchling: # “ValueError: build backend cannot provide build metadata (incl. runtime # requirements) before build”. See: https://github.com/ofek/hatch/issues/128 # # We work around this by writing the dependencies from pyproject.toml into a # text file. This may not be necessary in the future; see: # https://bugzilla.redhat.com/show_bug.cgi?id=2076994 Source1: extract-hatchling-dependencies # Written for Fedora in groff_man(7) format based on --help output Source100: hatch.1 Source200: hatch-build.1 Source300: hatch-clean.1 Source400: hatch-config.1 Source401: hatch-config-explore.1 Source402: hatch-config-find.1 Source403: hatch-config-restore.1 Source404: hatch-config-set.1 Source405: hatch-config-show.1 Source406: hatch-config-update.1 Source500: hatch-dep.1 Source501: hatch-dep-hash.1 Source510: hatch-dep-show.1 Source511: hatch-dep-show-table.1 Source600: hatch-env.1 Source700: hatch-new.1 Source800: hatch-publish.1 Source900: hatch-run.1 Source1000: hatch-shell.1 Source1100: hatch-status.1 Source1200: hatch-version.1 # Add requires_internet mark to additional tests # https://github.com/ofek/hatch/pull/171 Patch: %{url}/pull/171.patch # Upgrade tomlkit and bump Hatchling # - Upgrade tomlkit for better formatting # - Bump the minimum supported version of Hatchling # https://github.com/ofek/hatch/pull/174 Patch: %{url}/pull/174.patch # Improve cross-platform Python finder for tests # https://github.com/ofek/hatch/pull/176 Patch: %{url}/pull/176.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: git-core # For script in %%generate_buildrequires: BuildRequires: python3dist(tomli) Requires: git-core %description Hatch is a modern, extensible Python project manager. Features: · Standardized build system with reproducible builds by default · Robust environment management with support for custom scripts · Easy publishing to PyPI or other sources · Version management · Configurable project generation with sane defaults · Responsive CLI, ~2-3x faster than equivalent tools %prep %autosetup -n hatch-%{tag} -p1 # Loosen version requirements that cannot be met in Fedora—all are # bleeding-edge during the development of hatch v1.0—and hope for the best. # https://bugzilla.redhat.com/show_bug.cgi?id=1887119 sed -r -i 's/("pyperclip>=)1\.8\.2"/\11\.8\.0"/' pyproject.toml %generate_buildrequires '%{SOURCE1}' -v %pyproject_buildrequires -R _req/project.txt %{?with_tests:_req/env.test.txt} %build %pyproject_wheel # The Markdown documentation is meant to be build with mkdocs. The HTML result # is unsuitable for packaging due to various bundled and pre-minified # JavaScript and CSS. See https://bugzilla.redhat.com/show_bug.cgi?id=2006555 # for discussion of similar problems with Sphinx and Doxygen. We therefore do # not build or install the documentation. %install %pyproject_install %pyproject_save_files hatch install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 \ '%{SOURCE100}' \ '%{SOURCE200}' \ '%{SOURCE300}' \ '%{SOURCE400}' '%{SOURCE401}' '%{SOURCE402}' '%{SOURCE403}' \ '%{SOURCE404}' '%{SOURCE405}' '%{SOURCE406}' \ '%{SOURCE500}' '%{SOURCE501}' '%{SOURCE510}' '%{SOURCE511}' \ '%{SOURCE600}' \ '%{SOURCE700}' \ '%{SOURCE800}' \ '%{SOURCE900}' \ '%{SOURCE1000}' \ '%{SOURCE1100}' \ '%{SOURCE1200}' %check %if %{with tests} # We ignore “tests/backend” because these belong to the “hatchling” package and # are run when we build the python-hatchling RPM. # # There is no need to deselect mark “requires_internet” manually because it # happens automagically via a runtime connectivity check. %pytest --ignore='tests/backend' -k "${k-}" -vv %else %pyproject_check_import %endif %files -f %{pyproject_files} # The license file is installed in an unusual subdirectory: %dir %{python3_sitelib}/hatch-%{srcversion}.dist-info/license_files %license %{python3_sitelib}/hatch-%{srcversion}.dist-info/license_files/LICENSE.txt %{_bindir}/hatch %{_mandir}/man1/hatch.1* %{_mandir}/man1/hatch-*.1* %changelog * Sat Apr 23 2022 Benjamin A. Beasley 1.0.0~rc16-1 - Update to 1.0.0rc16 * Sun Feb 06 2022 Benjamin A. Beasley 0.23.1-3 - Add man pages * Fri Feb 04 2022 Benjamin A. Beasley 0.23.1-2 - Add a few extra doc files * Fri Feb 04 2022 Benjamin A. Beasley 0.23.1-1 - Update to 0.23.1 (final pre-1.0 release) * Fri Feb 04 2022 Benjamin A. Beasley 0.23.0-15 - Port to pyproject-rpm-macros (“new guidelines”) * Thu Jan 20 2022 Fedora Release Engineering - 0.23.0-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Jul 22 2021 Fedora Release Engineering - 0.23.0-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Wed Jul 21 2021 Lumír Balhar - 0.23.0-10 - Fix FTBFS in Fedora rawhide * Fri Jun 04 2021 Python Maint - 0.23.0-9 - Rebuilt for Python 3.10 * Thu Jan 28 2021 Lumír Balhar - 0.23.0-8 - Skip one more test * Tue Jan 26 2021 Lumír Balhar - 0.23.0-7 - Skip broken test (timeouts) * Tue Jan 26 2021 Fedora Release Engineering - 0.23.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Mon Jan 25 2021 Lumír Balhar - 0.23.0-5 - Extend tests timeout * Tue Jul 28 2020 Fedora Release Engineering - 0.23.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 0.23.0-3 - Rebuilt for Python 3.9 * Wed Jan 29 2020 Fedora Release Engineering - 0.23.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Mon Nov 04 2019 Lumír Balhar - 0.23.0-1 - New upstream version 0.23.0 * Thu Oct 03 2019 Miro Hrončok - 0.20.0-12 - Rebuilt for Python 3.8.0rc1 (#1748018) * Mon Aug 19 2019 Miro Hrončok - 0.20.0-11 - Rebuilt for Python 3.8 * Thu Jul 25 2019 Fedora Release Engineering - 0.20.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Tue Feb 12 2019 Lumír Balhar - 0.20.0-9 - Fix dependency name python3-twine → twine * Fri Feb 01 2019 Fedora Release Engineering - 0.20.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Fri Jul 13 2018 Fedora Release Engineering - 0.20.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Wed Jun 27 2018 Lumír Balhar - 0.20.0-6 - Bump release to rebuild in side tag f29-python with Python 3.7 * Wed Jun 27 2018 Lumír Balhar - 0.20.0-5 - Fix FTBFS due to failing tests which newly requires internet connection * Tue Jun 19 2018 Miro Hrončok - 0.20.0-4 - Rebuilt for Python 3.7 * Wed Feb 07 2018 Fedora Release Engineering - 0.20.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Tue Dec 05 2017 Lumir Balhar - 0.20.0-2 - Backslashes removed from description * Wed Nov 15 2017 Lumir Balhar - 0.20.0-1 - New upstream version - New dependencies python-adduserpath (module userpath) and python-toml - One test skipped due to internet connection requirement * Wed Sep 13 2017 Lumir Balhar - 0.11.0-1 - Initial package.