| |
@@ -2,86 +2,71 @@
|
| |
|
| |
Name: %{pypi_name}
|
| |
Version: 3.1.0
|
| |
- Release: 1%{?dist}
|
| |
+ Release: 2%{?dist}
|
| |
Summary: CLI for Postgres Database. With auto-completion and syntax highlighting
|
| |
|
| |
License: BSD
|
| |
- URL: http://pgcli.com
|
| |
+ URL: https://www.pgcli.com/
|
| |
Source0: %{pypi_source}
|
| |
+
|
| |
+ # Backport a portion of commit 762fb4b8da98fdf6792e6c5586060ed37224f894,
|
| |
+ # corresponding to https://github.com/dbcli/pgcli/pull/1229 “Modernize code to
|
| |
+ # Python 3.6+”, to remove the dependency on PyPI mock; see
|
| |
+ # https://fedoraproject.org/wiki/Changes/DeprecatePythonMock.
|
| |
+ Patch0: %{pypi_name}-3.1.0-DeprecatePythonMock.patch
|
| |
+
|
| |
BuildArch: noarch
|
| |
|
| |
BuildRequires: python3-devel
|
| |
- BuildRequires: python3dist(cli-helpers) >= 1.2
|
| |
- BuildRequires: python3dist(click) >= 4.1
|
| |
- BuildRequires: python3dist(configobj) >= 5.0.6
|
| |
- BuildRequires: python3dist(humanize) >= 0.5.1
|
| |
- #BuildRequires: python3dist(keyring) >= 12.2
|
| |
- BuildRequires: python3dist(prompt-toolkit)
|
| |
- BuildRequires: python3dist(psycopg2) >= 2.8
|
| |
- BuildRequires: python3dist(pygments) >= 2
|
| |
- BuildRequires: python3dist(setproctitle) >= 1.1.9
|
| |
- BuildRequires: python3dist(setuptools)
|
| |
- BuildRequires: python3dist(sqlparse)
|
| |
-
|
| |
- Requires: python3dist(cli-helpers) >= 1.2
|
| |
- Requires: python3dist(click) >= 4.1
|
| |
- Requires: python3dist(configobj) >= 5.0.6
|
| |
- Requires: python3dist(humanize) >= 0.5.1
|
| |
- #Requires: python3dist(keyring) >= 12.2
|
| |
- Requires: python3dist(prompt-toolkit)
|
| |
- Requires: python3dist(psycopg2) >= 2.8
|
| |
- Requires: python3dist(pygments) >= 2
|
| |
- Requires: python3dist(setproctitle) >= 1.1.9
|
| |
- Requires: python3dist(sqlparse)
|
| |
- Requires: python3dist(pendulum)
|
| |
-
|
| |
- %{?python_provide:%python_provide python3-%{pypi_name}}
|
| |
-
|
| |
- #BuildRequires for tests
|
| |
+ BuildRequires: pyproject-rpm-macros
|
| |
+
|
| |
+ # Additional BuildRequires for tests, not in the package metadata. Versions
|
| |
+ # come from tox.ini in unreleased upstream sources. Note that upstream wants
|
| |
+ # pytest <= 3.0.7, and we will have to unpin it and hope for the best.
|
| |
BuildRequires: python3dist(pytest) >= 2.7.0
|
| |
- BuildRequires: python3dist(pgspecial) >= 1.11.8
|
| |
- BuildRequires: python3dist(click) >= 4.1
|
| |
- BuildRequires: python3dist(pygments) >= 2.0
|
| |
- BuildRequires: python3dist(prompt-toolkit)
|
| |
- BuildRequires: python3dist(psycopg2) >= 2.8
|
| |
- BuildRequires: python3dist(sqlparse) >= 0.3.0
|
| |
- BuildRequires: python3dist(configobj) >= 5.0.6
|
| |
- BuildRequires: python3dist(humanize) => 0.5.1
|
| |
- BuildRequires: python3dist(cli-helpers) >= 1.2.0
|
| |
-
|
| |
- BuildRequires: python3dist(setproctitle) >= 1.1.9
|
| |
- BuildRequires: python3dist(mock) >= 1.0.1
|
| |
BuildRequires: python3dist(behave) >= 1.2.4
|
| |
BuildRequires: python3dist(pexpect) >= 3.3
|
| |
- BuildRequires: python3dist(keyring) >= 11.0.0
|
| |
- BuildRequires: python3dist(pendulum)
|
| |
+
|
| |
+ %py_provides python3-%{pypi_name}
|
| |
|
| |
%description
|
| |
CLI for Postgres Database. With auto-completion and syntax highlighting
|
| |
|
| |
+ %pyproject_extras_subpkg -n python3-%{pypi_name} keyring
|
| |
+
|
| |
+ %generate_buildrequires
|
| |
+ %pyproject_buildrequires -x keyring
|
| |
+
|
| |
%prep
|
| |
- %autosetup
|
| |
- # Remove bundled egg-info
|
| |
- rm -rf %{pypi_name}.egg-info
|
| |
- sed -i 's#"prompt_toolkit>=.*"#"prompt_toolkit >= 2.0.6"#' setup.py
|
| |
+ %autosetup -p1
|
| |
|
| |
%build
|
| |
- %py3_build
|
| |
+ %pyproject_wheel
|
| |
|
| |
%install
|
| |
- %py3_install
|
| |
+ %pyproject_install
|
| |
+ %pyproject_save_files %{pypi_name}
|
| |
|
| |
%check
|
| |
- PYTHONPATH=build/lib/ py.test-3
|
| |
+ %pytest
|
| |
|
| |
- %files
|
| |
+ %files -f %{pyproject_files}
|
| |
%license LICENSE.txt
|
| |
%doc README.rst changelog.rst
|
| |
%{_bindir}/%{pypi_name}
|
| |
- %{python3_sitelib}/%{pypi_name}
|
| |
- %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
|
| |
|
| |
%changelog
|
| |
+ * Mon Mar 29 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 3.1.0-2
|
| |
+ - Resolve RHBZ#1923075
|
| |
+ - Use pyproject-rpm-macros to eliminate error-prone manual BR’s
|
| |
+ - Do not manually duplicate automatic Requires
|
| |
+ - Drop obsolete sed invocation on setup.py
|
| |
+ - Do not use obsolete python_provide macro; use py_provides macro instead
|
| |
+ - Add the Python extras metapackage for the keyring extra
|
| |
+ - Use the pytest macro
|
| |
+ - Stop removing bundled egg-info
|
| |
+ - Switch to HTTPS URL
|
| |
+
|
| |
* Sat Feb 20 2021 Dick Marinus <dick@mrns.nl - 3.1.0-1
|
| |
- Update to v3.1.0
|
| |
|
| |
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1923075.
Addresses https://fedoraproject.org/wiki/Changes/DeprecatePythonMock by backporting a patch from upstream.
Adds the metapackage needed for the “keyring” extra (https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_python_extras).
Removes manual Requires (relying instead on automatic Requires generation); uses pyproject-rpm-macros to generate BuildRequires as well. This greatly simplifies the spec file and keeps the version specifications from getting out of sync with the upstream project metadata.
The result builds on F35 and F34 (older releases lack proper versions of one or more dependencies for the 3.1.0 release) and resolves the current FTBFS. It should also be much easier to maintain.
Let me know if you have questions or complaints, or need/want a co-maintainer.