From 32dfa43bd12df8a2b80f43f89941d35487fff9ad Mon Sep 17 00:00:00 2001 From: Felix Wang Date: Feb 18 2024 15:39:29 +0000 Subject: initial import; rhbz#2264739 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1b27a9d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/sphinx-lint-0.9.1.tar.gz diff --git a/packit.yaml b/packit.yaml new file mode 100644 index 0000000..d5baabb --- /dev/null +++ b/packit.yaml @@ -0,0 +1,20 @@ +upstream_project_url: https://github.com/sphinx-contrib/sphinx-lint +upstream_tag_template: v{version} + +jobs: + - job: pull_from_upstream + trigger: release + dist_git_branches: + - fedora-all + + - job: koji_build + trigger: commit + allowed_pr_authors: ["packit", "topazus"] + allowed_committers: ["packit", "topazus"] + dist_git_branches: + - fedora-all + + - job: bodhi_update + trigger: commit + dist_git_branches: + - fedora-all diff --git a/python-sphinx-lint.spec b/python-sphinx-lint.spec new file mode 100644 index 0000000..ed67851 --- /dev/null +++ b/python-sphinx-lint.spec @@ -0,0 +1,62 @@ +Name: python-sphinx-lint +Version: 0.9.1 +Release: %autorelease +Summary: Check stylistic and formal issues in .rst and .py files in the documentation + +License: PSF-2.0 +URL: https://github.com/sphinx-contrib/sphinx-lint +Source: %{url}/archive/v%{version}/sphinx-lint-%{version}.tar.gz + +BuildArch: noarch +BuildRequires: python3-devel + +%global _description %{expand: +Sphinx Lint should: + +- be reasonably fast so it's comfortable to use as a linter in your editor. +- be usable on a single file. +- not give any false positives (probably a utopia, but let's try). +- not spend too much effort finding errors that sphinx-build already finds (or +can easily find). +- focus on finding errors that are not visible to sphinx-build. +} + +%description %_description + +%package -n python3-sphinx-lint +Summary: %{summary} + +%description -n python3-sphinx-lint %_description + +%pyproject_extras_subpkg -n python3-sphinx-lint tests + +%prep +%autosetup -p1 -n sphinx-lint-%{version} + +# adopted from python-sphinx-argparse-cli package +sed -i '/name = "sphinx-lint"/a version = "%{version}"' \ + pyproject.toml +sed -i '/version.source = "vcs"/d' pyproject.toml +sed -i '/"version",/{n;d;}' pyproject.toml +sed -i '/ "version",/d' pyproject.toml +sed -i '/^dynamic = \[/d' pyproject.toml + +%generate_buildrequires +%pyproject_buildrequires -x tests + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files sphinxlint + +%check +%pyproject_check_import +%pytest + +%files -n python3-sphinx-lint -f %{pyproject_files} +%{_bindir}/sphinx-lint + +%changelog +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..d4f7f05 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (sphinx-lint-0.9.1.tar.gz) = ae88cd687b390e598e433bae9d37fa720bcce773dfb840dd379121cbadeecce6c7995fc8eabf061a31cb5e814e79fd55d2701f12cd70a1a5a5a0417fded4e758