Navigation Menu

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

pythonPackages.xapian: init -> 1.4.8 #49662

Closed
wants to merge 1 commit into from

Conversation

leenaars
Copy link
Contributor

@leenaars leenaars commented Nov 3, 2018

Motivation for this change

Python bindings for Xapian, which is a dependency for a larger project I'm packaging.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

Copy link
Member

@Ma27 Ma27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Building this with Python 3 results in the following error locally:

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/sykvsqgx21lzm2a2pbm0c6xr0kp7vrd6-python3.6-xapian-bindings-python-1.4.8
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/sykvsqgx21lzm2a2pbm0c6xr0kp7vrd6-python3.6-xapian-bindings-python-1.4.8/lib
patching script interpreter paths in /nix/store/sykvsqgx21lzm2a2pbm0c6xr0kp7vrd6-python3.6-xapian-bindings-python-1.4.8
checking for references to /build in /nix/store/sykvsqgx21lzm2a2pbm0c6xr0kp7vrd6-python3.6-xapian-bindings-python-1.4.8...
Failed to import the site module
Traceback (most recent call last):
  File "/nix/store/cx4364dn6qx4xci990q1bk6i5z4880kw-python2.7-setuptools-40.2.0/lib/python2.7/site-packages/site.py", line 73, in <module>
    __boot()
  File "/nix/store/cx4364dn6qx4xci990q1bk6i5z4880kw-python2.7-setuptools-40.2.0/lib/python2.7/site-packages/site.py", line 26, in __boot
    import imp  # Avoid import loop in Python 3
  File "/nix/store/bwfygfcdvis9wd1c1v51xwnwhw1hx0a0-python3-3.6.6/lib/python3.6/imp.py", line 27, in <module>
    import tokenize
  File "/nix/store/bwfygfcdvis9wd1c1v51xwnwhw1hx0a0-python3-3.6.6/lib/python3.6/tokenize.py", line 33, in <module>
    import re
  File "/nix/store/bwfygfcdvis9wd1c1v51xwnwhw1hx0a0-python3-3.6.6/lib/python3.6/re.py", line 142, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
builder for '/nix/store/kzf83wyn0qhhr5iki3j85dzqsbz7370c-python3.6-xapian-bindings-python-1.4.8.drv' failed with exit code 1

Is it possible to fix it? I'm not that happy to merge Python2 only stuff into master these days as Python 2 will be EOLed in about a year.

@@ -2466,6 +2466,8 @@ in {

colored = callPackage ../development/python-modules/colored { };

xapian-bindings-python = callPackage ../development/libraries/xapian/bindings/python.nix { };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's IMHO sufficient to name this either xapian-bindings or even just xapian. The python suffix is not needed as it's part of the pythonPackages set.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if there's no PyPI name the name best be the same as the original package, so xapian

pkgs/development/libraries/xapian/bindings/python.nix Outdated Show resolved Hide resolved
make install
'';

doCheck = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please add a comment what exactly is failing here?

description = "Python Bindings for Xapian";
homepage = https://xapian.org/;
license = licenses.gpl2Plus;
platforms = platforms.unix;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't have a hard rule for this, but is there a reason you don't want to be a maintainer of this? :)

pkgs/development/libraries/xapian/bindings/python.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/xapian/bindings/python.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/xapian/bindings/python.nix Outdated Show resolved Hide resolved
@@ -2466,6 +2466,8 @@ in {

colored = callPackage ../development/python-modules/colored { };

xapian-bindings-python = callPackage ../development/libraries/xapian/bindings/python.nix { };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if there's no PyPI name the name best be the same as the original package, so xapian

@FRidh
Copy link
Member

FRidh commented Dec 8, 2018

also, try and use the pname as folder name.

@leenaars leenaars force-pushed the xapian-bindings branch 2 times, most recently from 24b2a2f to 9f4a6ad Compare December 10, 2018 00:08
@leenaars
Copy link
Contributor Author

Am having some weird issues with the GitHub interface... can't respond to the questions anymore...

@Ma27
Copy link
Member

Ma27 commented Dec 17, 2018

@leenaars any progress on the PR? GitHub is doing weird things in their UI recently, it should be fine to leave a comment here (where you quote the review comments) if you have questions or want to discuss about these :)

@leenaars
Copy link
Contributor Author

@Ma27: I added myself as maintainer.
@FRidh: I changed to pname, removed the redundant python and platform.

Re the package name: To me using the name of the tarball as the package name makes the most sense. I put this in a folder under the main xapian folder with the programming language name. There are quite a few more language bindings in that packages, I have no expertise in packaging those languages. I do think it makes sense to have the bindings next to each other instead of scattered across nixpkgs - they belong to the library, and are all derived from the same tarball xapian-bindings-${version}.tar.xz...

@leenaars
Copy link
Contributor Author

@Ma27: GitHub interface still unusable, cannot work with anything ...

@aanderse
Copy link
Member

@leenaars are your github issues resolved to a point you can continue on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants