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.pyscf: init at 1.7.1 #78872

Closed
wants to merge 13 commits into from

Conversation

drewrisinger
Copy link
Contributor

@drewrisinger drewrisinger commented Jan 30, 2020

Motivation for this change

Add dependency for upcoming qiskit-terra package #78772 @jonringer
Depends on #78871

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@drewrisinger
Copy link
Contributor Author

@GrahamcOfBorg build python3Packages.pyscf

@drewrisinger
Copy link
Contributor Author

build fails, depending on PR #78871 (libcint)

Copy link
Member

@timokau timokau left a comment

Choose a reason for hiding this comment

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

Looks pretty good to me, but there is one serious issue (wrong name for the library function) and one minor nitpick.

pkgs/development/python-modules/pyscf/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/pyscf/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/pyscf/default.nix Outdated Show resolved Hide resolved
Python-based Simulations of Chemistry Framework.

Requirement for qiskit-aqua.
Exchange-correlation functionals with arbitrary order derivatives.

Library dependency of pythonPackages.pyscf.
As far as I know, libcint is only used for PySCF, so this just corrects
the build flags that it should have to build properly for that.
pkgs/development/python-modules/pyscf/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/pyscf/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/pyscf/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/pyscf/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/pyscf/default.nix Outdated Show resolved Hide resolved
@drewrisinger drewrisinger changed the title pythonPackages.pyscf: init at 1.7.0 pythonPackages.pyscf: init at 1.7.1 Mar 31, 2020
@drewrisinger
Copy link
Contributor Author

I'm not sure if this should be included in the main Nix repo. Right now the only reason for this package's existence is a plugin to pythonPackages.qiskit-aqua, but I've fixed that package so this isn't a strict requirement. Maybe Nix User Repository would be a better fit? I don't have strong feelings.

@drewrisinger
Copy link
Contributor Author

drewrisinger commented Mar 31, 2020

@GrahamcOfBorg eval
Note: still one or two failing tests. working to resolve.

ln -s ${lib.getLib xcfun}/lib/libxc.so ./pyscf/lib/deps/lib/libxcfun.so
substituteInPlace pyscf/rt/__init__.py --replace "from tdscf import *" "from pyscf.tdscf import *"
'';

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

Comment on lines +67 to +71
preBuild = ''
pushd pyscf/lib/build
make
popd
'';
Copy link
Contributor

Choose a reason for hiding this comment

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

this should work as well

Suggested change
preBuild = ''
pushd pyscf/lib/build
make
popd
'';
makeFlags = [ "-C pyscf/lib/build" ];

Comment on lines +92 to +93
# HACK: Move compiled libraries to test dir so pyscf import mechanism can find them
cp ./dist/tmpbuild/pyscf/pyscf/lib/*.so ./pyscf/lib/
Copy link
Contributor

@jonringer jonringer Mar 31, 2020

Choose a reason for hiding this comment

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

this might not be needed anymore, the pythonImportsCheck hook was patched so it would not change PWD to $out

@drewrisinger
Copy link
Contributor Author

@jonringer thoughts on above question? #78872 (comment)

@jonringer
Copy link
Contributor

jonringer commented Mar 31, 2020

I'm not sure if this should be included in the main Nix repo. Right now the only reason for this package's existence is a plugin to pythonPackages.qiskit-aqua, but I've fixed that package so this isn't a strict requirement. Maybe Nix User Repository would be a better fit? I don't have strong feelings.

I think moving to the NUR is great for now. There is a lot going on with these package additions, and I'm not sure if either of us want to get it to that level of a "polished" shine.

If you do want to re-open this for nixpkgs I'll be happy to review it :)

@drewrisinger
Copy link
Contributor Author

Agreed, thanks. It's always felt like an ugly, difficult package to me, so I don't really mind removing it. Related: Would it be worth removing libcint (#78771), as this is the only thing that required it?

@jonringer
Copy link
Contributor

Agreed, thanks. It's always felt like an ugly, difficult package to me, so I don't really mind removing it. Related: Would it be worth removing libcint (#78771), as this is the only thing that required it?

If burden of maintainership is low (I'm not super familiar with the oCaml nix ecosystem), then I would say leave it.

Python packages are a pretty large maintainer burden due to how fluid most breaking changes are.

@drewrisinger
Copy link
Contributor Author

Ack @jonringer. Wrong PR, I meant libcint (C library) #78871, whoops.

@jonringer
Copy link
Contributor

jonringer commented Mar 31, 2020

Statement still applies, doesn't look like an extreme burden. I would just leave

Edit: I need to learn how to spell

@drewrisinger
Copy link
Contributor Author

Future reference: moved to https://github.com/drewrisinger/nur-packages.
drewrisinger/nur-packages@4989535

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

3 participants