15
0
Files
python-atpublic/python-atpublic.spec
Dirk Mueller 20829ca87f - update to 4.0:
* Drop Python 3.7 support (GL#16)
  * Remove ``public.install()`` which was used to inject the
    ``public`` and ``private`` functions into the ``builtins``
    namespace.  This isn't very helpful and could be actively
    harmful.  Explicit is better than implicit. (GL#14)
  * The functional form of ``public()`` now returns the argument
    *values* in the order they are given.  This allows you to
    explicitly bind those values to names in the global namespace.
  * Switch from ``flake8`` and ``isort`` to ``ruff`` for code
    quality. (GL#32)
  * Switch to ``pdm-backend`` (GL#15)
  * More GitLab CI integration improvements.
  * https://gitlab.com/warsaw/public/-/merge_requests/16

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-atpublic?expand=0&rev=14
2023-12-07 20:12:00 +00:00

83 lines
2.2 KiB
RPMSpec

#
# spec file for package python-atpublic
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?sle15_python_module_pythons}
Name: python-atpublic
Version: 4.0
Release: 0
Summary: @public decorator for populating __all__
License: Apache-2.0
Group: Development/Languages/Python
URL: http://public.readthedocs.io/
Source: https://gitlab.com/warsaw/public/-/archive/%{version}/public-%{version}.tar.gz#/atpublic-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module pdm-backend}
BuildRequires: %{python_module pdm-pep517 >= 1.0}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
%if %{with test}
# SECTION test requirements
BuildRequires: %{python_module atpublic}
BuildRequires: %{python_module coverage}
BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module sybil}
# /SECTION
%endif
%python_subpackages
%description
public -- @public for populating __all__.
%prep
%setup -q -n public-%{version}
%build
%pyproject_wheel
%install
%if !%{with test}
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%else
%check
%pytest
%endif
%if !%{with test}
%files %{python_files}
%doc docs/NEWS.rst README.rst
%license LICENSE
%{python_sitelib}/public
%{python_sitelib}/atpublic-%{version}*-info
%endif
%changelog