From 643bea5831586a2b19268997df0c8fd0b55a96a7 Mon Sep 17 00:00:00 2001 From: Carl George Date: Apr 11 2022 19:02:40 +0000 Subject: Convert to pyproject macros --- diff --git a/python-jedi.spec b/python-jedi.spec index d18a9c5..d73d01c 100644 --- a/python-jedi.spec +++ b/python-jedi.spec @@ -7,14 +7,14 @@ than all other static analysis frameworks for Python.} %bcond_without tests # jedi bundles 2 other projects -# when using the git tarball, the proejcts need to be pulled separately +# when using the git tarball, the projects need to be pulled separately # when using tarballs from PyPI, those are included %global django_stubs_commit fd057010f6cbf176f57d1099e82be46d39b99cb9 %global typeshed_commit ae9d4f4b21bb5e1239816c301da7b1ea904b44c3 Name: python-jedi Version: 0.18.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: An auto completion tool for Python that can be used for text editors # jedi is MIT @@ -30,22 +30,13 @@ BuildArch: noarch %description %{common_description} -%package -n python%{python3_pkgversion}-jedi +%package -n python3-jedi Summary: %{summary} -BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: python%{python3_pkgversion}-setuptools -%if %{with tests} -BuildRequires: python%{python3_pkgversion}-pytest -BuildRequires: python%{python3_pkgversion}-docopt -BuildRequires: python%{python3_pkgversion}-colorama -BuildRequires: python%{python3_pkgversion}-parso >= 0.8 -%endif -%{?python_provide:%python_provide python%{python3_pkgversion}-jedi} - +BuildRequires: python3-devel Provides: bundled(python3dist(django-stubs)) = %{django_stubs_commit} Provides: bundled(typeshed) = %{typeshed_commit} -%description -n python%{python3_pkgversion}-jedi %{common_description} +%description -n python3-jedi %{common_description} %prep @@ -60,31 +51,43 @@ popd cp -p jedi/third_party/django-stubs/LICENSE.txt LICENSE-django-stubs.txt cp -p jedi/third_party/typeshed/LICENSE LICENSE-typeshed.txt +# relax upper limits on test dependencies +sed -e 's/pytest<7.0.0/pytest/' \ + -e 's/Django<3.1/Django/' \ + -i setup.py + + +%generate_buildrequires +%pyproject_buildrequires %{?with_tests:-x testing} + %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files jedi -%if %{with tests} %check +%if %{with tests} # TODO investigate failing / skipped tests # venv_and_pths: %%pytest manipulates the sys.path %pytest --ignore test/test_integration.py -k "not venv_and_pths" +%else +%pyproject_check_import %endif -%files -n python%{python3_pkgversion}-jedi -%license LICENSE.txt LICENSE-django-stubs.txt LICENSE-typeshed.txt -%doc AUTHORS.txt CHANGELOG.rst README.rst -%{python3_sitelib}/jedi/ -%{python3_sitelib}/jedi-%{version}-py%{python3_version}.egg-info/ +%files -n python3-jedi -f %{pyproject_files} +%doc CHANGELOG.rst README.rst %changelog +* Fri Apr 08 2022 Carl George - 0.18.1-3 +- Convert to pyproject macros + * Fri Jan 21 2022 Fedora Release Engineering - 0.18.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild