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

python2Packages.pyezminc: init at 1.2 #41086

Merged
merged 1 commit into from Jun 7, 2018
Merged

Conversation

bcdarwin
Copy link
Member

@bcdarwin bcdarwin commented May 25, 2018

Motivation for this change
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
    • other Linux distributions
  • [NA] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • [NA] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • [NA] Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

buildPythonPackage rec {
pname = "pyezminc";
version = "1.2";
name = "${pname}-${version}";
Copy link
Member

Choose a reason for hiding this comment

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

drop this line

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't understand this comment

Copy link
Member

Choose a reason for hiding this comment

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

name is set automatically by buildPythonPackage

Copy link
Member Author

Choose a reason for hiding this comment

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

removed

src = fetchFromGitHub {
owner = "BIC-MNI";
repo = "pyezminc";
rev = "b9fc331c5ad296348fa1ac39df8b0e26ed667d85";
Copy link
Member

Choose a reason for hiding this comment

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

rev = "release-${version}"

Copy link
Member Author

Choose a reason for hiding this comment

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

done


buildPythonPackage rec {
pname = "pyezminc";
version = "1.2";
Copy link
Member

Choose a reason for hiding this comment

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

1.2.01

Copy link
Member Author

Choose a reason for hiding this comment

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

done

buildInputs = [ netcdf hdf5 libminc ezminc ];
propagatedBuildInputs = [ numpy scipy ];

preBuild = "export CFLAGS='-fpermissive'";
Copy link
Member

Choose a reason for hiding this comment

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

I think there's some more standard way to do this. Please grep through Nixpkgs.

Copy link
Member Author

Choose a reason for hiding this comment

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

changed to NIX_CFLAGS_COMPILE

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

disabled = isPy3k; # ??
Copy link
Member

Choose a reason for hiding this comment

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

README says

BUILD REQUIREMENTS:

  • python2-devel

so I think it should remain disabled for Python 3. Please update the comment.

Copy link
Member Author

Choose a reason for hiding this comment

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

comment removed

description = "Python API for libminc using EZMINC";
license = stdenv.lib.licenses.gpl2;
maintainers = with stdenv.lib.maintainers; [ bcdarwin ];
platforms = stdenv.lib.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.

drop this line

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't understand this comment

Copy link
Member

Choose a reason for hiding this comment

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

platforms is set automatically by buildPythonPackage

Copy link
Member Author

Choose a reason for hiding this comment

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

removed


preBuild = "export CFLAGS='-fpermissive'";

doCheck = false; # e.g., expects test data in /opt
Copy link
Member

@dotlambda dotlambda May 25, 2018

Choose a reason for hiding this comment

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

Probably needs patching in postPatch: https://github.com/BIC-MNI/pyezminc/search?q=opt

Copy link
Member

Choose a reason for hiding this comment

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

Is there a package that includes share/icbm152_model_09c?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think they're available as a tarball somewhere so in principle they could be included in this package or another one (e.g. BEAST, not yet Nixified)

@bcdarwin bcdarwin force-pushed the pyezminc branch 3 times, most recently from 474473c to 5d06aa7 Compare May 25, 2018 22:16
@FRidh
Copy link
Member

FRidh commented May 27, 2018

@GrahamcOfBorg build python2Packages.pyezminc python3Packages.pyezminc

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: python2Packages.pyezminc, python3Packages.pyezminc

Partial log (click to expand)

Cannot nix-instantiate `python3Packages.pyezminc' because:
error: while evaluating 'callPackageWith' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix:113:35, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/top-level/python-packages.nix:1247:14:
while evaluating 'makeOverridable' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix:72:24, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix:117:8:
while evaluating anonymous function at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/development/python-modules/pyezminc/default.nix:1:1, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix:74:12:
while evaluating 'makeOverridablePythonPackage' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/top-level/python-packages.nix:40:37, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/development/python-modules/pyezminc/default.nix:6:1:
while evaluating 'makeOverridable' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix:72:24, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/top-level/python-packages.nix:42:12:
while evaluating anonymous function at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/development/interpreters/python/build-python-package.nix:27:1, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix:74:12:
while evaluating anonymous function at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/development/interpreters/python/mk-python-derivation.nix:15:1, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/development/interpreters/python/build-python-package.nix:44:4:
pyezminc-1.2.01 not supported for interpreter python3.6m

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: python2Packages.pyezminc

The following builds were skipped because they don't evaluate on aarch64-linux: python3Packages.pyezminc

Partial log (click to expand)

In file included from /nix/store/qj5klm2wy0zdmc77ah7yq06l6n684qrb-python2.7-numpy-1.14.3/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1816:0,
                 from /nix/store/qj5klm2wy0zdmc77ah7yq06l6n684qrb-python2.7-numpy-1.14.3/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                 from /nix/store/qj5klm2wy0zdmc77ah7yq06l6n684qrb-python2.7-numpy-1.14.3/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from extension_type_memoryview.cpp:580:
/nix/store/qj5klm2wy0zdmc77ah7yq06l6n684qrb-python2.7-numpy-1.14.3/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it by " \
  ^~~~~~~
building of '/nix/store/q7ifrgp5rc01chib7bri9y5hmn3kndzk-python2.7-Cython-0.28.2.drv' timed out after 3600 seconds
cannot build derivation '/nix/store/qa6h90rlyizszlpbcrsdkqak4acm0nvh-python2.7-pyezminc-1.2.01.drv': 1 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/qa6h90rlyizszlpbcrsdkqak4acm0nvh-python2.7-pyezminc-1.2.01.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python2Packages.pyezminc

The following builds were skipped because they don't evaluate on x86_64-linux: python3Packages.pyezminc

Partial log (click to expand)

Successfully installed pyezminc-1.2
/build/source
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/kj5j4s2v0sq580fg231hykpq77n67bzm-python2.7-pyezminc-1.2.01
shrinking /nix/store/kj5j4s2v0sq580fg231hykpq77n67bzm-python2.7-pyezminc-1.2.01/lib/python2.7/site-packages/pyezminc.so
strip is /nix/store/92d2ifxcni4n3zx9s8wnkcjlvnx5ajlc-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/kj5j4s2v0sq580fg231hykpq77n67bzm-python2.7-pyezminc-1.2.01/lib
patching script interpreter paths in /nix/store/kj5j4s2v0sq580fg231hykpq77n67bzm-python2.7-pyezminc-1.2.01
checking for references to /build in /nix/store/kj5j4s2v0sq580fg231hykpq77n67bzm-python2.7-pyezminc-1.2.01...
/nix/store/kj5j4s2v0sq580fg231hykpq77n67bzm-python2.7-pyezminc-1.2.01

@FRidh FRidh merged commit de4cbd0 into NixOS:master Jun 7, 2018
@bcdarwin bcdarwin deleted the pyezminc branch June 7, 2018 17:02
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