Spec URL: https://alciregi.fedorapeople.org/python-parsimonious/python-parsimonious.spec SRPM URL: https://alciregi.fedorapeople.org/python-parsimonious/python-parsimonious-0.8.1-1.fc35.src.rpm Description: Parsimonious aims to be the fastest arbitrary-lookahead parser written in pure Python, and the most usable. It's based on parsing expression grammars (PEGs), which means you feed it a simplified sort of EBNF notation. Parsimonious was designed to undergird a MediaWiki parser that wouldn't take 5 seconds or a GB of RAM to do one page, but it's applicable to all sorts of languages. I need this in order to subsequently package https://github.com/httpie/http-prompt Fedora Account System Username: alciregi Koji scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=80799815
Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated Issues: ======= - Package must not depend on deprecated() packages. Note: python3-nose is deprecated, you must not depend on it. See: https://docs.fedoraproject.org/en-US/packaging- guidelines/deprecating-packages/ See https://fedoraproject.org/wiki/Changes/DeprecateNose. The most obvious choices are either - Rebase https://github.com/erikrose/parsimonious/pull/168 to the 0.8.1 tag and apply it as a patch. This is the nicest choice if feasible. I can help if you want to go this way but run into trouble. or - Don’t run the tests. You could use %py3_check_import (https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#py3_check_import) instead. This is unfortunate; hopefully there will be a future upstream release with the PR merged. - The URL is wrong; please change URL: https://https://github.com/erikrose/parsimonious to URL: https://github.com/erikrose/parsimonious - The Source0 URL is wrong; please change Source0: https://github.com/erikrose/archive/v%{version}/parsimonious-%{version}.tar.gz to Source0: https://github.com/erikrose/parsimonious/archive/%{version}/parsimonious-%{version}.tar.gz or Source0: %{url}/archive/%{version}/parsimonious-%{version}.tar.gz Notes (no change required): =========================== - It seems like more people are writing python3dist(foo) than %{py3_dist foo} these days, but either is fine from a guidelines perspective. - If you are interested in switching to the “new Python guidelines” using pyproject-rpm-macros and generated BuildRequires, I’m happy to help, either now or later (in the form of a PR). However, you’re still free to use the “old guidelines.” ===== MUST items ===== Generic: [x]: Package is licensed with an open-source compatible license and meets other legal requirements as defined in the legal section of Packaging Guidelines. [x]: License field in the package spec file matches the actual license. Note: Checking patched sources after %prep for licenses. Licenses found: "Unknown or generated", "MIT License", "*No copyright* MIT License". 15 files have unknown license. Detailed output of licensecheck in /home/reviewer/2036758-python- parsimonious/licensecheck.txt [x]: Package contains no bundled libraries without FPC exception. [x]: Changelog in prescribed format. [x]: Sources contain only permissible code or content. [-]: Package contains desktop file if it is a GUI application. [-]: Development files must be in a -devel package [x]: Package uses nothing in %doc for runtime. [x]: Package consistently uses macros (instead of hard-coded directory names). [x]: Package is named according to the Package Naming Guidelines. [x]: Package does not generate any conflict. [x]: Package obeys FHS, except libexecdir and /usr/target. [-]: If the package is a rename of another package, proper Obsoletes and Provides are present. [x]: Requires correct, justified where necessary. [x]: Spec file is legible and written in American English. [-]: Package contains systemd file(s) if in need. [x]: Package is not known to require an ExcludeArch tag. [-]: Large documentation must go in a -doc subpackage. Large could be size (~1MB) or number of files. Note: Documentation size is 30720 bytes in 1 files. [x]: Package complies to the Packaging Guidelines (except as noted) [x]: Package successfully compiles and builds into binary rpms on at least one supported primary architecture. [x]: Package installs properly. [x]: Rpmlint is run on all rpms the build produces. Note: There are rpmlint messages (see attachment). [x]: If (and only if) the source package includes the text of the license(s) in its own file, then that file, containing the text of the license(s) for the package is included in %license. [x]: Package requires other packages for directories it uses. [x]: Package must own all directories that it creates. [x]: Package does not own files or directories owned by other packages. [x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT [x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the beginning of %install. [x]: Macros in Summary, %description expandable at SRPM build time. [x]: Dist tag is present. [x]: Package does not contain duplicates in %files. [x]: Permissions on files are set properly. [x]: Package use %makeinstall only when make install DESTDIR=... doesn't work. [x]: Package is named using only allowed ASCII characters. [x]: Package does not use a name that already exists. [x]: Package is not relocatable. [x]: Sources used to build the package match the upstream source, as provided in the spec URL. [x]: Spec file name must match the spec package %{name}, in the format %{name}.spec. [x]: File names are valid UTF-8. [x]: Packages must not store files under /srv, /opt or /usr/local Python: [x]: Python eggs must not download any dependencies during the build process. [x]: A package which is used by another package via an egg interface should provide egg info. [x]: Package meets the Packaging Guidelines::Python [x]: Package contains BR: python2-devel or python3-devel [x]: Packages MUST NOT have dependencies (either build-time or runtime) on packages named with the unversioned python- prefix unless no properly versioned package exists. Dependencies on Python packages instead MUST use names beginning with python2- or python3- as appropriate. [x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files [x]: Binary eggs must be removed in %prep ===== SHOULD items ===== Generic: [!]: Sources can be downloaded from URI in Source: tag Note: Could not download Source0: https://github.com/erikrose/archive/v0.8.1/parsimonious-0.8.1.tar.gz See: https://docs.fedoraproject.org/en-US/packaging- guidelines/SourceURL/ [-]: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it. [x]: Final provides and requires are sane (see attachments). [x]: Package functions as described. (based on tests passing) [x]: Latest version is packaged. [x]: Package does not include license text files separate from upstream. [!]: SourceX tarball generation or download is documented. Note: Package contains tarball without URL, check comments Source0 URL is broken; see Issues. [-]: Sources are verified with gpgverify first in %prep if upstream publishes signatures. Note: gpgverify is not used. [-]: Description and summary sections in the package spec file contains translations for supported Non-English languages, if available. [x]: Package should compile and build into binary rpms on all supported architectures. [x]: %check is present and all tests pass. [x]: Packages should try to preserve timestamps of original installed files. [x]: Reviewer should test that the package builds in mock. [x]: Buildroot is not present [x]: Package has no %clean section with rm -rf %{buildroot} (or $RPM_BUILD_ROOT) [x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin. [x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file [x]: SourceX is a working URL. [x]: Spec use %global instead of %define unless justified. ===== EXTRA items ===== Generic: [x]: Rpmlint is run on all installed packages. Note: There are rpmlint messages (see attachment). [x]: Spec file according to URL is the same as in SRPM. Rpmlint ------- Cannot parse rpmlint output: Rpmlint (installed packages) ---------------------------- Cannot parse rpmlint output: Requires -------- python-parsimonious (rpmlib, GLIBC filtered): python(abi) python3.10dist(six) Provides -------- python-parsimonious: python-parsimonious python3.10dist(parsimonious) python3dist(parsimonious) Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10 Command line :/usr/bin/fedora-review -b 2036758 Buildroot used: fedora-rawhide-x86_64 Active plugins: Python, Generic, Shell-api Disabled plugins: Java, Ocaml, C/C++, R, PHP, fonts, SugarActivity, Haskell, Perl Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH ============================ rpmlint session starts ============================ rpmlint: 2.2.0 configuration: /usr/lib/python3.10/site-packages/rpmlint/configdefaults.toml /etc/xdg/rpmlint/fedora.toml /etc/xdg/rpmlint/licenses.toml /etc/xdg/rpmlint/scoring.toml /etc/xdg/rpmlint/users-groups.toml /etc/xdg/rpmlint/warn-on-functions.toml checks: 32, packages: 2 python-parsimonious.noarch: W: invalid-url URL https://https://github.com/erikrose/parsimonious python-parsimonious.src: W: invalid-url URL https://https://github.com/erikrose/parsimonious 2 packages and 0 specfiles checked; 0 errors, 2 warnings, 0 badness; has taken 0.2 s
> The most obvious choices are either > > - Rebase https://github.com/erikrose/parsimonious/pull/168 to the 0.8.1 > tag > and apply it as a patch. This is the nicest choice if feasible. I can > help if you want to go this way but run into trouble. > Ok. I'm in trouble. If I download the PR as a patch file https://github.com/erikrose/parsimonious/pull/168.patch#/0001-eliminate-nose-and-use-unittest.patch there are rejected parts applying the patch.
I managed to create the patch file in this way: git clone https://github.com/erikrose/parsimonious.git cd parsimonious git remote add original https://github.com/swayson/parsimonious git fetch original git diff HEAD original/master git diff HEAD original/master > ~/rpmbuild/SOURCES/0001-eliminate-nose-and-use-unittest.patch Is this correct? However I didn't use the 0.8.1 tag, but the last commit. (See the new spec file). Spec URL: https://alciregi.fedorapeople.org/python-parsimonious/python-parsimonious.spec SRPM URL: https://alciregi.fedorapeople.org/python-parsimonious/python-parsimonious-0.8.1-1.git3da7e80.fc35.src.rpm
It looks like that patch works, but also reverts some commits in the original upstream. When a PR applies cleanly to the last release, you can just add .patch to its URL, which is extremely convenient: https://github.com/erikrose/parsimonious/pull/168.patch However, that does work here because of changes that have happened in master since the last release. This is probably the right approach: > git clone https://github.com/erikrose/parsimonious > cd parsimonious > git remote add swayson https://github.com/swayson/parsimonious > git fetch --all > # Normally the PR would be from a branch; here it is from master > git checkout swayson/master > # Make our own branch to work in > git branch remove-nose > git checkout remove-nose > # Rebase, and drop all commits but the ones in the PR: 967f815 and b892772. > git rebase -i 0.8.1 > # Manually resolve a conflict in parsimonious/tests/test_grammar.py, > # where a change was made in a function that was added in one of the > # dropped commits. > vim parsimonious/tests/test_grammar.py > git add parsimonious/tests/test_grammar.py > git rebase --continue > git format-patch 0.8.1..remove-nose The resulting pair of patches should apply cleanly to the 0.8.1 release without requiring any extra changes. You could use them as-is: > Patch0: 0001-Eliminate-nose-and-use-unittest-instead.patch > Patch1: 0002-Update-the-setup-and-tox-settings-to-pytest.patch or form a combined patch: > cat 0001-Eliminate-nose-and-use-unittest-instead.patch 0002-Update-the-setup-and-tox-settings-to-pytest.patch > parsimonious-0.8.1-drop-nose.patch
Created attachment 1849571 [details] Patch for first commit in PR
Created attachment 1849572 [details] Patch for second commit in PR
Created attachment 1849573 [details] Combined patch
With those patches, you can use the 0.8.1 release tarball as you did in your original spec file. I should have explained that process in the first place—I got lazy and hoped I wouldn’t have to. ;-)
I see you converted to pyproject-rpm-macros, which is great! I’ll save the full re-review until you have a chance to read my feedback on the patch, but here’s what I see at a glance: - Can drop BuildRequires: pyproject-rpm-macros since python3-devel now depends on it - Can drop BuildRequires: python3dist(wheel) BuildRequires: python3dist(pytest-runner) BuildRequires: python3dist(tox-current-env) since they will be generated—wheel always with %pyproject_buildrequires, tox-current-env when using %pyproject_buildrequires, and pytest-runner as a consequence of it being added (strangely) to setup_requires in setup.py once you apply the patch(es) as described in my previous comments. - Change %files to %files -f %{pyproject_files} and remove %{python3_sitelib}/parsimonious-%{version}.dist-info/ %{python3_sitelib}/parsimonious/ - In many cases, you can remove %license LICENSE too, but you need to verify the license file in dist-info is marked using something like “rpm -qL -p /path/to/built/python3-foo.whatever.rpm”, since there are exceptions. https://pagure.io/packaging-committee/issue/1145 Leaving it in is not harmful.
Thank you very much. I opted for the two patch files. I asked upstream if there are any news on this PR https://github.com/erikrose/parsimonious/pull/168#issuecomment-1007951362 I get this deprecation warning + /usr/bin/python3 -m pip wheel --wheel-dir /var/home/alessio/rpmbuild/BUILD/parsimonious-0.8.1/pyproject-wheeldir --no-deps --use-pep517 --no-build-isolation --disable-pip-version-check --no-clean --progress-bar off --verbose . Processing /var/home/alessio/rpmbuild/BUILD/parsimonious-0.8.1 DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default. pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555. Running command /usr/bin/python3 /usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /var/home/alessio/rpmbuild/BUILD/parsimonious-0.8.1/.pyproject-builddir/tmpaahw8g2o (If I'm not wrong, I've seen it using pyproject-rpm-macros also on another package). Is it expected? New SPEC and SRPM: Spec URL: https://alciregi.fedorapeople.org/python-parsimonious/python-parsimonious.spec SRPM URL: https://alciregi.fedorapeople.org/python-parsimonious/python-parsimonious-0.8.1-1.git3da7e80.fc35.src.rpm
Whoops New SPEC and SRPM: Spec URL: https://alciregi.fedorapeople.org/python-parsimonious/python-parsimonious.spec SRPM URL: https://alciregi.fedorapeople.org/python-parsimonious/python-parsimonious-0.8.1-1.fc35.src.rpm
(In reply to Alessio from comment #10) > I get this deprecation warning > > […] > > (If I'm not wrong, I've seen it using pyproject-rpm-macros also on another > package). Is it expected? I would expect to see it in F34/F35/EL9, where out-of-tree builds are used. I would not expect to see it in F36, with 21.3+, where in-tree-builds are used. It’s harmless in that pyproject-rpm-macros should be doing the right thing either way.
Looks great (and beautifully straightforward!) except for a changelog format issue: Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated Issues ====== - The changelog line still has the snapshot version information in it. Please correct “0.8.1-1.git3da7e80” to “0.8.1-1”, or use rpmautospec (https://docs.pagure.org/Fedora-Infra.rpmautospec/). ===== MUST items ===== Generic: [x]: Package is licensed with an open-source compatible license and meets other legal requirements as defined in the legal section of Packaging Guidelines. [x]: License field in the package spec file matches the actual license. Note: Checking patched sources after %prep for licenses. Licenses found: "Unknown or generated", "MIT License", "*No copyright* MIT License". 15 files have unknown license. Detailed output of licensecheck in /home/reviewer/2036758-python- parsimonious/20220109/2036758-python-parsimonious/licensecheck.txt [x]: Package contains no bundled libraries without FPC exception. [!]: Changelog in prescribed format. [x]: Sources contain only permissible code or content. [-]: Package contains desktop file if it is a GUI application. [-]: Development files must be in a -devel package [x]: Package uses nothing in %doc for runtime. [x]: Package consistently uses macros (instead of hard-coded directory names). [x]: Package is named according to the Package Naming Guidelines. [x]: Package does not generate any conflict. [x]: Package obeys FHS, except libexecdir and /usr/target. [-]: If the package is a rename of another package, proper Obsoletes and Provides are present. [x]: Requires correct, justified where necessary. [x]: Spec file is legible and written in American English. [-]: Package contains systemd file(s) if in need. [x]: Package is not known to require an ExcludeArch tag. [-]: Large documentation must go in a -doc subpackage. Large could be size (~1MB) or number of files. Note: Documentation size is 30720 bytes in 1 files. [x]: Package complies to the Packaging Guidelines [x]: Package successfully compiles and builds into binary rpms on at least one supported primary architecture. [x]: Package installs properly. [x]: Rpmlint is run on all rpms the build produces. Note: There are rpmlint messages (see attachment). [x]: If (and only if) the source package includes the text of the license(s) in its own file, then that file, containing the text of the license(s) for the package is included in %license. [x]: Package requires other packages for directories it uses. [x]: Package must own all directories that it creates. [x]: Package does not own files or directories owned by other packages. [x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT [x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the beginning of %install. [x]: Macros in Summary, %description expandable at SRPM build time. [x]: Dist tag is present. [x]: Package does not contain duplicates in %files. [x]: Permissions on files are set properly. [x]: Package must not depend on deprecated() packages. [x]: Package use %makeinstall only when make install DESTDIR=... doesn't work. [x]: Package is named using only allowed ASCII characters. [x]: Package does not use a name that already exists. [x]: Package is not relocatable. [x]: Sources used to build the package match the upstream source, as provided in the spec URL. [x]: Spec file name must match the spec package %{name}, in the format %{name}.spec. [x]: File names are valid UTF-8. [x]: Packages must not store files under /srv, /opt or /usr/local Python: [x]: Python eggs must not download any dependencies during the build process. [x]: A package which is used by another package via an egg interface should provide egg info. [x]: Package meets the Packaging Guidelines::Python [x]: Package contains BR: python2-devel or python3-devel [x]: Packages MUST NOT have dependencies (either build-time or runtime) on packages named with the unversioned python- prefix unless no properly versioned package exists. Dependencies on Python packages instead MUST use names beginning with python2- or python3- as appropriate. [x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files [x]: Binary eggs must be removed in %prep ===== SHOULD items ===== Generic: [-]: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it. [x]: Final provides and requires are sane (see attachments). [x]: Package functions as described. (based on tests passing) [x]: Latest version is packaged. [x]: Package does not include license text files separate from upstream. [x]: Patches link to upstream bugs/comments/lists or are otherwise justified. [-]: Sources are verified with gpgverify first in %prep if upstream publishes signatures. Note: gpgverify is not used. [-]: Description and summary sections in the package spec file contains translations for supported Non-English languages, if available. [x]: Package should compile and build into binary rpms on all supported architectures. [x]: %check is present and all tests pass. [x]: Packages should try to preserve timestamps of original installed files. [x]: Reviewer should test that the package builds in mock. [x]: Buildroot is not present [x]: Package has no %clean section with rm -rf %{buildroot} (or $RPM_BUILD_ROOT) [x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin. [x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file [x]: Sources can be downloaded from URI in Source: tag [x]: SourceX is a working URL. [x]: Spec use %global instead of %define unless justified. ===== EXTRA items ===== Generic: [x]: Rpmlint is run on all installed packages. Note: There are rpmlint messages (see attachment). [x]: Spec file according to URL is the same as in SRPM. Rpmlint ------- Cannot parse rpmlint output: Rpmlint (installed packages) ---------------------------- Cannot parse rpmlint output: Source checksums ---------------- https://github.com/erikrose/parsimonious/archive/0.8.1/parsimonious-0.8.1.tar.gz : CHECKSUM(SHA256) this package : 8e2fbac5db5e06412ee3231ae9943e96cf4ea92695e090d65f9d273f2dfbf29b CHECKSUM(SHA256) upstream package : 8e2fbac5db5e06412ee3231ae9943e96cf4ea92695e090d65f9d273f2dfbf29b Requires -------- python-parsimonious (rpmlib, GLIBC filtered): python(abi) python3.10dist(six) Provides -------- python-parsimonious: python-parsimonious python3.10dist(parsimonious) python3dist(parsimonious) Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10 Command line :/usr/bin/fedora-review -b 2036758 Buildroot used: fedora-rawhide-x86_64 Active plugins: Shell-api, Generic, Python Disabled plugins: R, C/C++, fonts, Perl, Haskell, PHP, SugarActivity, Ocaml, Java Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH ============================ rpmlint session starts ============================ rpmlint: 2.2.0 configuration: /usr/lib/python3.10/site-packages/rpmlint/configdefaults.toml /etc/xdg/rpmlint/fedora.toml /etc/xdg/rpmlint/licenses.toml /etc/xdg/rpmlint/scoring.toml /etc/xdg/rpmlint/users-groups.toml /etc/xdg/rpmlint/warn-on-functions.toml checks: 32, packages: 2 python-parsimonious.noarch: W: incoherent-version-in-changelog 0.8.1-1.git3da7e80 ['0.8.1-1.fc36', '0.8.1-1'] 2 packages and 0 specfiles checked; 0 errors, 1 warnings, 0 badness; has taken 0.5 s
Whoops. Thanks. I added %autochangelog and also %autorelease Spec URL: https://alciregi.fedorapeople.org/python-parsimonious/python-parsimonious.spec SRPM URL: https://alciregi.fedorapeople.org/python-parsimonious/python-parsimonious-0.8.1-1.fc35.src.rpm
Thanks! Approved by inspection of the spec file diff: --- srpm-unpacked/python-parsimonious.spec 2022-01-08 12:49:31.000000000 -0500 +++ python-parsimonious.spec 2022-01-09 09:27:47.375536735 -0500 @@ -1,6 +1,6 @@ Name: python-parsimonious Version: 0.8.1 -Release: 1%{?dist} +Release: %autorelease Summary: A fast pure-Python PEG parser License: MIT @@ -43,5 +43,4 @@ %license LICENSE %changelog -* Sat Jan 08 2022 Alessio <alciregi AT fedoraproject DOT org> - 0.8.1-1.git3da7e80 -- Initial package +%autochangelog
Great. Thank you very much.
(fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/python-parsimonious
FEDORA-2022-1c1d211fe0 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-1c1d211fe0
FEDORA-2022-1c1d211fe0 has been pushed to the Fedora 35 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2022-1c1d211fe0 \*` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-1c1d211fe0 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-1c1d211fe0 has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report.