Adapting to the pyproject.toml compilation mode

This commit is contained in:
lyn1001 2023-04-26 17:20:08 +08:00
parent 4e963ac82e
commit 9257cf2155
2 changed files with 8 additions and 49 deletions

View File

@ -1,41 +0,0 @@
--- a/setup.py 1970-01-01 08:00:00.000000000 +0800
+++ b/setup.py 2022-10-25 13:51:33.908767146 +0800
@@ -0,0 +1,38 @@
+import notfound
+import setuptools
+
+
+with open('README.rst', 'r') as fh:
+ long_description = fh.read()
+
+setuptools.setup(
+ name='sphinx-notfound-page',
+ version=notfound.__version__,
+ author='Manuel Kaufmann',
+ author_email='humitos@gmail.com',
+ description='Sphinx extension to build a 404 page with absolute URLs',
+ url='https://github.com/readthedocs/sphinx-notfound-page',
+ license='MIT',
+ packages=setuptools.find_packages(),
+ long_description=long_description,
+ long_description_content_type='text/x-rst',
+ include_package_data=True,
+ zip_safe=False,
+ classifiers=[
+ 'Development Status :: 5 - Production/Stable',
+ 'Framework :: Sphinx',
+ 'Framework :: Sphinx :: Extension',
+ 'License :: OSI Approved :: MIT License',
+ 'Operating System :: OS Independent',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3',
+ 'Topic :: Documentation :: Sphinx',
+ 'Topic :: Software Development :: Documentation',
+ ],
+ keywords='notfound 404 page sphinx',
+ project_urls={
+ 'Documentation': 'https://sphinx-notfound-page.readthedocs.io/',
+ 'Source': 'https://github.com/readthedocs/sphinx-notfound-page',
+ 'Tracker': 'https://github.com/readthedocs/sphinx-notfound-page/issues',
+ },
+)

View File

@ -7,13 +7,12 @@
Name: python-%{pypi_name} Name: python-%{pypi_name}
Version: 0.8.3 Version: 0.8.3
Release: 1 Release: 2
Summary: Create a custom 404 page with absolute URLs hardcoded Summary: Create a custom 404 page with absolute URLs hardcoded
License: MIT License: MIT
URL: https://pypi.python.org/pypi/%{pypi_name} URL: https://pypi.python.org/pypi/%{pypi_name}
Source0: https://github.com/%{project_owner}/%{github_name}/archive/%{version}.tar.gz Source0: https://github.com/%{project_owner}/%{github_name}/archive/%{version}.tar.gz
Patch0: 0001-add-setup.py.patch
BuildArch: noarch BuildArch: noarch
@ -26,7 +25,7 @@ BuildArch: noarch
BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-sphinx BuildRequires: python%{python3_pkgversion}-sphinx
BuildRequires: python3-pytest BuildRequires: python3-pytest python3-pip python3-flit-core
Requires(post): %{_sbindir}/update-alternatives Requires(post): %{_sbindir}/update-alternatives
Requires(postun): %{_sbindir}/update-alternatives Requires(postun): %{_sbindir}/update-alternatives
Requires: python%{python3_pkgversion}-setuptools Requires: python%{python3_pkgversion}-setuptools
@ -39,14 +38,12 @@ Requires: python%{python3_pkgversion}-sphinx
%prep %prep
%autosetup -n %{pypi_name}-%{version} -p1 %autosetup -n %{pypi_name}-%{version} -p1
%patch0
%build %build
%py3_build %pyproject_build
%install %install
%py3_install %pyproject_install sphinx-notfound-page==%{version}
%check %check
PYTHONPATH=$PWD py.test-%{python3_version} -v . PYTHONPATH=$PWD py.test-%{python3_version} -v .
@ -54,10 +51,13 @@ PYTHONPATH=$PWD py.test-%{python3_version} -v .
%files -n python%{python3_pkgversion}-%{pypi_name} %files -n python%{python3_pkgversion}-%{pypi_name}
%license LICENSE %license LICENSE
%doc README.rst CHANGELOG.rst docs %doc README.rst CHANGELOG.rst docs
%{python3_sitelib}/%{srcname}-%{version}*-py%{python3_version}.egg-info/ %{python3_sitelib}/%{srcname}-%{version}.dist-info
%{python3_sitelib}/%{importname}/ %{python3_sitelib}/%{importname}/
%changelog %changelog
* Wed Apr 26 2023 liyanan <thistleslyn@163.com> - 0.8.3-2
- Adapting to the pyproject.toml compilation mode
* Tue Oct 25 2022 wangjunqi <wangjunqi@kylinos.cn> - 0.8.3-1 * Tue Oct 25 2022 wangjunqi <wangjunqi@kylinos.cn> - 0.8.3-1
- Update version to 0.8.3 - Update version to 0.8.3