Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3Packages.specfile: init at 0.32.6 #358631

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sielicki
Copy link
Contributor

@sielicki sielicki commented Nov 24, 2024

what is it?

This is a library from the packit project which provides a python interface for
parsing RPM spec files. It requires and uses pkgs.rpm/pkgs.python3Packages.rpm
under the hood for evaluation.

$ # grab a random spec from fedora rawhide
$ curl https://src.fedoraproject.org/rpms/libfabric/raw/rawhide/f/libfabric.spec -o libfabric.spec
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 11785  100 11785    0     0  16847      0 --:--:-- --:--:-- --:--:-- 16859

$ # What version did I just download?
$ cat libfabric.spec | grep '^Source0'
Source0:        https://github.com/ofiwg/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.bz2

$ # argh, need to emulate the rpm macro rules to know what this expands to...

$ nix run --impure --expr 'let pkgs = import ./. {}; in pkgs.python3.withPackages (pp: [ pp.specfile ])'
Python 3.12.7 (main, Oct  1 2024, 02:05:46) [Clang 16.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import specfile
>>> spec = specfile.Specfile("./libfabric.spec")
>>> with spec.sources() as sources:
...     source_list = [spec.expand(x.location) for x in sources]
...
>>> source_list
['https://github.com/ofiwg/libfabric/releases/download/v1.22.0/libfabric-1.22.0.tar.bz2']

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@nix-owners nix-owners bot requested a review from natsukium November 24, 2024 06:12
@sielicki sielicki force-pushed the add-python3Packages-specfile branch 2 times, most recently from c59a2a8 to 4cb8b85 Compare November 24, 2024 07:49
@sielicki sielicki changed the title python3Packages: init specfile at 0.32.6 python3Packages.specfile: init at 0.32.6 Nov 24, 2024
This is a library from the packit project which provides a python interface for
parsing RPM spec files. It requires and uses pkgs.rpm/pkgs.python3Packages.rpm
under the hood for evaluation.

Signed-off-by: Nicholas Sielicki <[email protected]>
@ofborg ofborg bot added ofborg-internal-error Ofborg encountered an error 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 labels Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: python 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes ofborg-internal-error Ofborg encountered an error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant