| |
@@ -1,45 +1,50 @@
|
| |
- # Need to use GitHub archive for tests. This version was not tagged.
|
| |
- %global commit 804d5fd902809bae19e72a50917bd90ab032e174
|
| |
- %global forgeurl https://github.com/ofek/hatch
|
| |
+ %bcond_without tests
|
| |
|
| |
Name: hatch
|
| |
- Version: 0.23.1
|
| |
- %forgemeta
|
| |
+ Version: 1.0.0
|
| |
Release: %autorelease
|
| |
Summary: A modern project, package, and virtual env manager
|
| |
|
| |
- License: MIT or ASL 2.0
|
| |
- URL: %{forgeurl}
|
| |
- Source0: %{forgesource}
|
| |
+ License: MIT
|
| |
+ URL: https://github.com/ofek/hatch
|
| |
+ %global tag hatch-v%{version}
|
| |
+ Source0: %{url}/archive/%{tag}/hatch-%{version}.tar.gz
|
| |
+ # For now, we need a helper script to access environments defined with
|
| |
+ # hatch/hatchling (https://ofek.dev/hatch/latest/config/environment/).
|
| |
+ Source1: extract-hatchling-environments
|
| |
|
| |
# Written for Fedora in groff_man(7) format based on --help output
|
| |
Source100: hatch.1
|
| |
- Source101: hatch-build.1
|
| |
- Source102: hatch-clean.1
|
| |
- Source103: hatch-conda.1
|
| |
- Source104: hatch-config.1
|
| |
- Source105: hatch-env.1
|
| |
- Source106: hatch-grow.1
|
| |
- Source107: hatch-init.1
|
| |
- Source108: hatch-install.1
|
| |
- Source109: hatch-new.1
|
| |
- Source110: hatch-pypath.1
|
| |
- Source111: hatch-python.1
|
| |
- Source112: hatch-release.1
|
| |
- Source113: hatch-shed.1
|
| |
- Source114: hatch-shell.1
|
| |
- Source115: hatch-test.1
|
| |
- Source116: hatch-use.1
|
| |
- Source117: hatch-uninstall.1
|
| |
- Source118: hatch-update.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
|
| |
|
| |
BuildArch: noarch
|
| |
|
| |
BuildRequires: python3-devel
|
| |
+ # RHBZ#1985340, RHBZ#2076994
|
| |
+ BuildRequires: pyproject-rpm-macros >= 1.2.0
|
| |
BuildRequires: git-core
|
| |
|
| |
- # Required for tests but not present in the package metadata:
|
| |
- BuildRequires: python3dist(parse)
|
| |
+ # For script in %%generate_buildrequires:
|
| |
+ BuildRequires: python3dist(tomli)
|
| |
|
| |
Requires: git-core
|
| |
|
| |
@@ -48,67 +53,73 @@
|
| |
|
| |
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
|
| |
+ • 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
|
| |
- %forgeautosetup
|
| |
- cp -p '%{SOURCE100}' '%{SOURCE101}' '%{SOURCE102}' '%{SOURCE103}' \
|
| |
- '%{SOURCE104}' '%{SOURCE105}' '%{SOURCE106}' '%{SOURCE107}' \
|
| |
- '%{SOURCE108}' '%{SOURCE109}' '%{SOURCE110}' '%{SOURCE111}' \
|
| |
- '%{SOURCE112}' '%{SOURCE113}' '%{SOURCE114}' '%{SOURCE115}' \
|
| |
- '%{SOURCE116}' '%{SOURCE117}' '%{SOURCE118}' .
|
| |
+ %autosetup -n hatch-%{tag} -p1
|
| |
+
|
| |
+ # Loosen version requirements that cannot yet be met in Fedora.
|
| |
+
|
| |
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1887119
|
| |
+ sed -r -i 's/("pyperclip>=)1\.8\.2"/\11\.8\.0"/' pyproject.toml
|
| |
|
| |
|
| |
%generate_buildrequires
|
| |
- %pyproject_buildrequires
|
| |
+ '%{SOURCE1}' -v
|
| |
+ %pyproject_buildrequires -w %{?with_tests:_req/env.test.txt}
|
| |
|
| |
|
| |
%build
|
| |
%pyproject_wheel
|
| |
|
| |
+ # The Markdown documentation is meant to be built 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 hatch.1 hatch-*.1
|
| |
+
|
| |
+ 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
|
| |
- # test_download_file needs internet
|
| |
- k="${k-}${k+ and }not test_download_file"
|
| |
- # test_env timeouts (on its own limit) in Koji
|
| |
- k="${k-}${k+ and }not test_env"
|
| |
- # test_grow is not compatible with the latest click:
|
| |
- # https://github.com/ofek/hatch/issues/99 (fixed for 1.0)
|
| |
- k="${k-}${k+ and }not test_grow"
|
| |
- # > assert parsed['coverage_command'] == '\n\nafter_success:\n - codecov'
|
| |
- # E AssertionError: assert '\n\nafter_su... - codecov\n' == '\n\nafter_su...\n - codecov'
|
| |
- # E
|
| |
- # E
|
| |
- # E after_success:
|
| |
- # E - - codecov
|
| |
- # E + - codecov
|
| |
- # E ? +
|
| |
- # TODO: what exactly is happening here? Adding a BR on python3dist(codecov)
|
| |
- # doesn’t make a difference.
|
| |
- k="${k-}${k+ and }not test_coverage_command"
|
| |
-
|
| |
- %pytest -k "${k-}"
|
| |
+ %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}
|
| |
- # pyproject_files handles LICENSE-* and AUTHORS.rst; verify with “rpm -qL -p …”
|
| |
- %doc COMMANDS.rst
|
| |
- %doc CONFIG.rst
|
| |
- %doc HISTORY.rst
|
| |
- %doc README.rst
|
| |
-
|
| |
+ %license LICENSE.txt
|
| |
%{_bindir}/hatch
|
| |
%{_mandir}/man1/hatch.1*
|
| |
%{_mandir}/man1/hatch-*.1*
|
| |
This PR has tracked
hatch
release candidates so that 1.0.0 final could be packaged promptly when it was released. It is now updated to 1.0.0 final.