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

Bcolz init at 1.1.2 #29627

Closed
wants to merge 1 commit into from
Closed

Bcolz init at 1.1.2 #29627

wants to merge 1 commit into from

Conversation

gabesoft
Copy link
Contributor

@gabesoft gabesoft commented Sep 21, 2017

Motivation for this change

Added the bcolz package

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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/)
  • Fits CONTRIBUTING.md.

@@ -3677,6 +3677,24 @@ in {
};
};

bcolz = buildPythonPackage rec {
Copy link
Member

Choose a reason for hiding this comment

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

this needs to be moved to python-modules/bcolz/default.nix as explained in the header of this file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved.

bcolz = buildPythonPackage rec {
name = "bcolz-1.1.2";

src = pkgs.fetchurl {
Copy link
Member

Choose a reason for hiding this comment

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

fetchPypi

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, that's better. Fixed.

};

propagatedBuildInputs = with self; [ numpy mock ];
buildInputs = with self; [ numpy ];
Copy link
Member

Choose a reason for hiding this comment

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

No need if already a propagatedBuildInput

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

buildInputs = with self; [ numpy ];

meta = {
description = "A columnar data container that can be compressed.";
Copy link
Member

Choose a reason for hiding this comment

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

Description should have no period at the end. https://nixos.org/nixpkgs/manual/#sec-standard-meta-attributes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed the period

@FRidh
Copy link
Member

FRidh commented Sep 23, 2017

$ nix-build -A python3.pkgs.bcolz
these derivations will be built:
  /nix/store/v21c4vg3l2xdxgng7nbi9vkc35cxx4sh-python3.6-bcolz-1.1.2.drv
building path(s) '/nix/store/8r3gnr1y7fhpdgrhzyjlvg66ifcs81kq-python3.6-bcolz-1.1.2'
building '/nix/store/v21c4vg3l2xdxgng7nbi9vkc35cxx4sh-python3.6-bcolz-1.1.2.drv'...
unpacking sources
unpacking source archive /nix/store/qdl77bwvb2ryzcxgdqprxwr6k2ra4vqi-bcolz-1.1.2.tar.gz
source root is bcolz-1.1.2
/nix/store/j1ly0zzpnzb8y8ry6k4vi4prk8vwq233-set-source-date-epoch-to-latest.sh: line 7: warning: command substitution: ignored null byte in input
setting SOURCE_DATE_EPOCH to timestamp 1486026331 of file bcolz-1.1.2/setup.cfg
patching sources
configuring
building
Download error on https://pypi.python.org/simple/setuptools-scm/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'setuptools-scm' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or working download links found for setuptools-scm>1.5.4
SSE2 detected
AVX2 detected
Traceback (most recent call last):
  File "nix_run_setup.py", line 8, in <module>
    exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
  File "setup.py", line 234, in <module>
    cmdclass=LazyCommandClass(),
  File "/nix/store/9y5qyjs1s155vnwlxprg626xp19bfvv6-python3-3.6.2/lib/python3.6/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/nix/store/xdas067jb01m1lwf5pmnxgmsi92jg926-python3.6-bootstrapped-pip-9.0.1/lib/python3.6/site-packages/setuptools/dist.py", line 335, in __init__
    self.fetch_build_eggs(attrs['setup_requires'])
  File "/nix/store/xdas067jb01m1lwf5pmnxgmsi92jg926-python3.6-bootstrapped-pip-9.0.1/lib/python3.6/site-packages/setuptools/dist.py", line 456, in fetch_build_eggs
    replace_conflicting=True,
  File "/nix/store/xdas067jb01m1lwf5pmnxgmsi92jg926-python3.6-bootstrapped-pip-9.0.1/lib/python3.6/site-packages/pkg_resources/__init__.py", line 863, in resolve
    replace_conflicting=replace_conflicting
  File "/nix/store/xdas067jb01m1lwf5pmnxgmsi92jg926-python3.6-bootstrapped-pip-9.0.1/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1141, in best_match
    return self.obtain(req, installer)
  File "/nix/store/xdas067jb01m1lwf5pmnxgmsi92jg926-python3.6-bootstrapped-pip-9.0.1/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1153, in obtain
    return installer(requirement)
  File "/nix/store/xdas067jb01m1lwf5pmnxgmsi92jg926-python3.6-bootstrapped-pip-9.0.1/lib/python3.6/site-packages/setuptools/dist.py", line 522, in fetch_build_egg
    return cmd.easy_install(req)
  File "/nix/store/xdas067jb01m1lwf5pmnxgmsi92jg926-python3.6-bootstrapped-pip-9.0.1/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 666, in easy_install
    raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools-scm>1.5.4')
builder for '/nix/store/v21c4vg3l2xdxgng7nbi9vkc35cxx4sh-python3.6-bcolz-1.1.2.drv' failed with exit code 1
error: build of '/nix/store/v21c4vg3l2xdxgng7nbi9vkc35cxx4sh-python3.6-bcolz-1.1.2.drv' failed

Please test with sandboxing.

@gabesoft
Copy link
Contributor Author

Please test with sandboxing

Thanks, fixed. Tested for python27 & python35

version = "1.1.2";
name = "${pname}-${version}";

disabled = !(isPy35 || isPy27);
Copy link
Member

Choose a reason for hiding this comment

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

surely it works on other interpreter versions as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. Removed.

{ stdenv, buildPythonPackage, fetchPypi, numpy, mock, setuptools_scm, isPy27, isPy35 }:

buildPythonPackage rec {
pname = "bcolz";
Copy link
Member

Choose a reason for hiding this comment

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

2 space indentation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

};

doCheck = isPy27;
propagatedBuildInputs = [ numpy mock setuptools_scm ];
Copy link
Member

Choose a reason for hiding this comment

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

is setuptools_scm needed during runtime?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved it to buildInputs

sha256 = "0ws0b9p1r4gcxic7fm8clm2q2ily3bd6i4giczw4s6gv5ilk7ds2";
};

doCheck = isPy27;
Copy link
Member

Choose a reason for hiding this comment

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

why disable tests with other versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could only get the tests to pass on python2

@FRidh
Copy link
Member

FRidh commented Sep 26, 2017

distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('cython>=0.22')

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

4 participants