Accepting request 1057152 from home:bnavigator:branches:devel:languages:python

- Update to v1.6.3
  ## Fixed:
  * Fix version command when the version is dynamic and build
    dependencies are unmet
- Release 1.6.2 - 2022-10-20
  ## Fixed:
  * Fix getting dynamic metadata from hooks for environments when
    dependencies are not dynamic
- Release 1.6.1 - 2022-10-16
  ## Fixed:
  * Computing the path to the user's home directory now gracefully
    falls back to ~ when it cannot be determined
- Release 1.6.0 - 2022-10-08
  ## Changed:
  * The run_shell_command environment interface method now accepts
    arbitrary subprocess.Popen keyword arguments. This is not
    strictly breaking, but will be utilized in upcoming features.
  * The internal directory structure for storing virtual
    environments is now more nested. This is not breaking, but any
    local environments will be created anew.
  ## Added:
  * Add project command group to view details about the project
    like PEP 621 metadata
  * Better support for auto-detection of environments by tools like
    Visual Studio Code now that the storage directory of virtual
    environments will be flat if Hatch's configured virtual
    environment directory resides somewhere within the project root
    or if it is set to a .virtualenvs directory within the user's
    home directory
  * Build environments for the virtual environment type are now

OBS-URL: https://build.opensuse.org/request/show/1057152
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hatch?expand=0&rev=13
This commit is contained in:
Matej Cepl 2023-01-10 14:21:55 +00:00 committed by Git OBS Bridge
parent 044cbdde33
commit fcd053b419
6 changed files with 304 additions and 70 deletions

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<flavor>test</flavor>
</multibuild>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b4b65753fcd8319ebddd51c0e1ef148d09592cdc38923d032f8f58ffc1658fd7
size 73637

43
hatch-pr659-utf8.patch Normal file
View File

@ -0,0 +1,43 @@
From c42f1d7086e4a8d1a7e1f299c50db2f1a16a2e3d Mon Sep 17 00:00:00 2001
From: Ofek Lev <ofekmeister@gmail.com>
Date: Sat, 10 Dec 2022 11:49:48 -0500
Subject: [PATCH] Remove unnecessary encoding declaration
---
backend/src/hatchling/version/core.py | 1 -
docs/history/hatchling.md | 4 ++++
tests/backend/builders/hooks/test_version.py | 2 --
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/backend/src/hatchling/version/core.py b/backend/src/hatchling/version/core.py
index 38c26aca7..cad01f94b 100644
--- a/backend/src/hatchling/version/core.py
+++ b/backend/src/hatchling/version/core.py
@@ -5,7 +5,6 @@
DEFAULT_PATTERN = r'(?i)^(__version__|VERSION) *= *([\'"])v?(?P<version>.+?)\2'
DEFAULT_TEMPLATE = """\
-# -*- coding: utf-8 -*-
# This file is auto-generated by Hatchling. As such, do not:
# - modify
# - track in version control e.g. be sure to add to .gitignore
diff --git a/tests/backend/builders/hooks/test_version.py b/tests/backend/builders/hooks/test_version.py
index 3b916d3ed..b03500292 100644
--- a/tests/backend/builders/hooks/test_version.py
+++ b/tests/backend/builders/hooks/test_version.py
@@ -91,7 +91,6 @@ def update(self, metadata):
assert expected_file.is_file()
assert expected_file.read_text() == helpers.dedent(
"""
- # -*- coding: utf-8 -*-
# This file is auto-generated by Hatchling. As such, do not:
# - modify
# - track in version control e.g. be sure to add to .gitignore
@@ -132,7 +131,6 @@ def update(self, metadata):
assert expected_file.is_file()
assert expected_file.read_text() == helpers.dedent(
"""
- # -*- coding: utf-8 -*-
# This file is auto-generated by Hatchling. As such, do not:
# - modify
# - track in version control e.g. be sure to add to .gitignore

3
hatch-v1.6.3.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:de6d4bb1b6453de289551fac54e3d114eaeed369dc8f1b8a3493849c3581b423
size 367984

View File

@ -1,3 +1,194 @@
-------------------------------------------------------------------
Fri Jan 6 16:17:06 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Update to v1.6.3
## Fixed:
* Fix version command when the version is dynamic and build
dependencies are unmet
- Release 1.6.2 - 2022-10-20
## Fixed:
* Fix getting dynamic metadata from hooks for environments when
dependencies are not dynamic
- Release 1.6.1 - 2022-10-16
## Fixed:
* Computing the path to the user's home directory now gracefully
falls back to ~ when it cannot be determined
- Release 1.6.0 - 2022-10-08
## Changed:
* The run_shell_command environment interface method now accepts
arbitrary subprocess.Popen keyword arguments. This is not
strictly breaking, but will be utilized in upcoming features.
* The internal directory structure for storing virtual
environments is now more nested. This is not breaking, but any
local environments will be created anew.
## Added:
* Add project command group to view details about the project
like PEP 621 metadata
* Better support for auto-detection of environments by tools like
Visual Studio Code now that the storage directory of virtual
environments will be flat if Hatch's configured virtual
environment directory resides somewhere within the project root
or if it is set to a .virtualenvs directory within the user's
home directory
* Build environments for the virtual environment type are now
cached for improved performance
* Add build_environment_exists method to the environment
interface for implementations that cache the build environment
* Add path option to the virtual environment type
* Add --initialize-auth flag to the index publisher to allow for
the saving of authentication information before publishing
* Support Bash on Windows for the shell command
* The setuptools migration script no longer modifies the
formatting of existing pyproject.toml configuration
* Bump the minimum supported version of Hatchling to 1.11.0
## Fixed:
* Environments now respect dynamically defined project
dependencies
* The dep hash and all dep show commands now respect dynamically
defined project dependencies
* The env show, dep hash, and all dep show commands now honor
context formatting
* Fix matrix variable inclusion filtering of the run and env run
commands when there are multiple possible variables
* Build environment compatibility is now checked before use
* Decreasing verbosity now has no affect on output that should
always be displayed
* Handle more edge cases in the setuptools migration script
* Environments now respect user defined environment variables for
context formatting
* Update the scripts in the generated test environment template
for new projects to reflect the documentation
* Allow extra-dependencies in environment overrides
* Depend on packaging explicitly rather than relying on it being
a transitive dependency of Hatchling
- Release 1.5.0 - 2022-08-28
## Added:
* The index publisher now recognizes repository-specific options
* Add the --ignore-compat flag to the env run command
* Setting the HATCH_PYTHON environment variable to self will now
force the use of the Python executable Hatch is running on for
virtual environment creation
## Fixed:
* Fix the --force-continue flag of the env run command
* Handle more edge cases in the setuptools migration script
- Release 1.4.2 - 2022-08-16
## Fixed:
* Fix check for updating static versions with the version command
when metadata hooks are in use
- Release 1.4.1 - 2022-08-13
## Fixed:
* Fix non-detached inheritance disabling for environments
- Release 1.4.0 - 2022-08-06
## Added:
* The default Python for virtual environments now checks PATH
before using the one Hatch is running on
* Values for environment env-vars now support context formatting
* Add name override for environments to allow for regular
expression matching
* The index publisher now better supports non-PyPI indices
* Add certificate options to the index publisher
* Display waiting text when checking dependencies and removing
environments
* Display help text the first time the shell command is executed
* Update project templates with Python 3.11 and the latest
versions of various GitHub Actions
* Add support for Almquist (ash) shells
* Add hyperlink as a dependency for better handling of package
index URLs
* Bump the minimum supported version of virtualenv to 20.16.2
* Bump the minimum supported version of tomlkit to 0.11.1
## Fixed:
* Acknowledge extra-dependencies for the env show command
* Fix locating executables within virtual environments on Debian
* Fix managing the terminal size inside the shell command
* Fix default code coverage file omission for the src-layout
project template option
- Release 1.3.1 - 2022-07-11
## Fixed:
* Support -h/--help flag for the run command
- Release 1.3.0 - 2022-07-10
## Changed:
* Rename the default publishing plugin from pypi to the more
generic index
## Added:
* Support the absence of pyproject.toml files, as is the case for
apps and non-Python projects
* Hide scripts that start with an underscore for the env show
command by default
* Ignoring the exit codes of commands by prefixing with hyphens
now works with entire named scripts
* Add a way to require confirmation for publishing
* Add --force-continue flag to the env run command
* Make tracebacks colorful and less verbose
* When shell configuration has not been defined, attempt to use
the current shell based on parent processes before resorting to
the defaults
* The shell name pwsh is now an alias for powershell
* Remove atomicwrites dependency
* Relax constraint on userpath dependency
* Bump the minimum supported version of Hatchling to 1.4.1
## Fixed:
* Keep environments in sync with the dependencies of the selected
features
* Use utf-8 for all files generated for new projects
* Escape special characters Git may return in the user name when
writing generated files for new projects
* Normalize the package name to lowercase in setuptools migration
script
* Fix parsing of source distributions during publishing
- Release 1.2.1 - 2022-05-30
## Fixed:
* Fix handling of top level data_files in setuptools migration
script
- Release 1.2.0 - 2022-05-22
## Changed:
* The enter_shell environment plugin method now accepts an
additional args parameter
## Added:
* Allow context string formatting for environment dependencies
* Add environment context string formatting fields env_name,
env_type, matrix, verbosity, and args
* Support overriding the default arguments used to spawn shells
on non-Windows systems
* Bump the minimum supported version of Hatchling to 1.3.0
## Fixed:
* Improve setuptools migration script
- Release 1.1.2 - 2022-05-20
## Fixed:
* Bump the minimum supported version of Hatchling to 1.2.0
* Update project metadata to reflect support for Python 3.11
- Release 1.1.1 - 2022-05-12
## Fixed:
* Fix setuptools migration script for non-Windows systems
- Release 1.1.0 - 2022-05-12
## Changed:
* In order to simplify the implementation of command execution
for environment plugins, the run_shell_commands method has been
replaced by the singular run_shell_command. A new
command_context method has been added to more easily satisfy
complex use cases.
* The finalize_command environment plugin method has been removed
in favor of the newly introduced context formatting
functionality.
## Added:
* Add context formatting functionality i.e. the ability to insert
values into configuration like environment variables and
command line arguments
* Any verbosity for command execution will now always display
headers, even for single environments
* Every executed command is now displayed when running multiple
commands or when verbosity is enabled
* Similar to make, ignore the exit code of executed commands that
start with - (a hyphen)
* Add ability for the --init flag of the new command to
automatically migrate setuptools configuration
* Update project metadata to reflect the adoption by PyPA and
production stability
- Release 1.0.0 - 2022-04-28
* This is the first stable release of Hatch v1, a complete
rewrite. Enjoy!
- Use python dependency generator, check in multibuild
-------------------------------------------------------------------
Mon Jun 8 11:01:18 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-hatch
# spec file
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,86 +16,80 @@
#
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-hatch
Version: 0.23.0
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
Name: python-hatch%{psuffix}
Version: 1.6.3
Release: 0
Summary: A modern project, package, and virtual env manager
License: MIT OR Apache-2.0
URL: https://github.com/ofek/hatch
Source: https://files.pythonhosted.org/packages/source/h/hatch/hatch-%{version}.tar.gz
BuildRequires: %{python_module appdirs}
BuildRequires: %{python_module atomicwrites}
BuildRequires: %{python_module click}
BuildRequires: %{python_module colorama}
BuildRequires: %{python_module coverage}
BuildRequires: %{python_module devel > 3.5}
BuildRequires: %{python_module parse}
BuildRequires: %{python_module pexpect}
BuildRequires: %{python_module pip >= 9.0.1}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module semver >= 2.7.8}
BuildRequires: %{python_module setuptools >= 36.0.0}
BuildRequires: %{python_module sortedcontainers >= 1.5.7}
BuildRequires: %{python_module toml >= 0.9.3}
BuildRequires: %{python_module twine >= 1.9.1}
BuildRequires: %{python_module userpath >= 1.3.0}
BuildRequires: %{python_module virtualenv}
BuildRequires: %{python_module wheel >= 0.27.0}
BuildRequires: dos2unix
Summary: Modern, extensible Python project management
License: MIT
URL: https://hatch.pypa.io/latest/
# SourceRepository: https://github.com/pypa/hatch
Source: https://github.com/pypa/hatch/archive/refs/tags/hatch-v%{version}.tar.gz
# PATCH-FIX-UPSTREAM hatch-pr659-utf8.patch gh#pypa/hatch#659 required due to newer hatchling
Patch1: hatch-pr659-utf8.patch
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module hatchling >= 1.11.0}
BuildRequires: %{python_module pip}
BuildRequires: fdupes
BuildRequires: git-core
BuildRequires: python-rpm-macros
Requires: git-core
Requires: python-appdirs
Requires: python-atomicwrites
Requires: python-click
Requires: python-colorama
Requires: python-coverage
Requires: python-pexpect
Requires: python-pip >= 9.0.1
Requires: python-pytest
Requires: python-semver >= 2.7.8
Requires: python-setuptools >= 36.0.0
Requires: python-sortedcontainers
Requires: python-toml >= 0.9.3
Requires: python-twine >= 1.9.1
Requires: python-userpath >= 1.3.0
Requires: python-virtualenv
Requires: python-wheel >= 0.27.0
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires: git-core
%{?python_enable_dependency_generator}
%if %{with test}
BuildRequires: %{python_module filelock >= 3.7.1}
BuildRequires: %{python_module hatch = %{version}}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest-randomly}
BuildRequires: %{python_module pytest-rerunfailures}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module trustme}
%endif
%python_subpackages
%description
Hatch is a productivity tool designed to make your workflow easier and more
efficient, while also reducing the number of other tools you need to know.
It aims to make the 90% use cases as pleasant as possible.
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 indexes
* Version management
* Configurable project generation with sane defaults
* Responsive CLI, ~2-3x faster than equivalent tools
%prep
%setup -q -n hatch-%{version}
%autosetup -p1 -n hatch-hatch-v%{version}
%if !%{with test}
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/hatch
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%if %{with test}
%check
export LANG=en_US.UTF-8
export PATH=$PATH:%{buildroot}%{_bindir}
# test_list_success_1 randomly timeouts in OBS
# test_failure expect syntax of output from invoke, which we do not ensure
# test_invalid_part - flaky
# test_package_cwd - flaky
# test_list_success_2 - flaky
# test_output - flaky
# FIXME: the tests if run 100x fail randomly in multiple locations, just skip them as they are TOO flaky
#%%pytest -k 'not (test_list_success_1 or test_failure or test_invalid_part or test_package_cwd or test_list_success_2 or test_output)'
# tests expect this to be unset and use their own reproducible value. Nothing installed from here.
# https://hatch.pypa.io/latest/config/build/#reproducible-builds
unset SOURCE_DATE_EPOCH
%pytest
%endif
%post
%python_install_alternative hatch
@ -103,10 +97,13 @@ export PATH=$PATH:%{buildroot}%{_bindir}
%postun
%python_uninstall_alternative hatch
%if !%{with test}
%files %{python_files}
%doc README.rst
%license LICENSE-APACHE LICENSE-MIT
%doc README.md
%license LICENSE.txt
%python_alternative %{_bindir}/hatch
%{python_sitelib}/*
%{python_sitelib}/hatch
%{python_sitelib}/hatch-%{version}.dist-info
%endif
%changelog