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.Pyomo: init at 5.4.3 #37372
Conversation
framework. | ||
''; | ||
license = licenses.bsdOriginal; | ||
maintainers = with maintainers; [ ericsagnes ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if you don't set platforms hydra won't build it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to set platforms
when using buildPython*
. It is set to the appropriate platforms by default.
framework. | ||
''; | ||
license = licenses.bsdOriginal; | ||
maintainers = with maintainers; [ ericsagnes ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to set platforms
when using buildPython*
. It is set to the appropriate platforms by default.
The PyUtilib project supports a collection of Python utilities, including | ||
a well-developed component architecture and extensions to the PyUnit testing | ||
framework. | ||
''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description
should be a single line. There is also longDescription
, which is optional however.
See https://nixos.org/nixpkgs/manual/#sec-standard-meta-attributes.
|
||
buildPythonPackage rec { | ||
pname = "PyUtilib"; | ||
name = "${pname}-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can leave the line out because name
is automatically set to ${pname}-${version}
by buildPython*
.
sha256 = "17rynkkq728b7iy65m2rz9gcycipk0r8xiplfb5lvg5l27zm52gv"; | ||
}; | ||
|
||
doCheck = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because tests are failing:
writing manifest file 'PyUtilib.egg-info/SOURCES.txt'
running build_ext
error: [Errno 2] No such file or directory: 'test/config1.out'
builder for '/nix/store/sknnjb4x0fcyszrwpspzy6axjdhlmzkc-python3.6-PyUtilib-5.6.2.drv' failed with exit code 1
error: build of '/nix/store/sknnjb4x0fcyszrwpspzy6axjdhlmzkc-python3.6-PyUtilib-5.6.2.drv' failed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then you need to set an appropriate checkPhase
, something like test.pyutilib --cat=all
: https://github.com/PyUtilib/pyutilib/blob/master/.travis.yml
name = "${pname}-${version}"; | ||
version = "5.6.2"; | ||
|
||
propagatedBuildInputs = [ nose six ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nose
should go into checkInputs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving nose
to checkInputs
make the build fail:
Collecting nose (from PyUtilib==5.6.2)
Could not find a version that satisfies the requirement nose (from PyUtilib==5.6.2) (from versions: )
No matching distribution found for nose (from PyUtilib==5.6.2)
builder for '/nix/store/z2b5nxy01cdns11kk8dhp1idraars3lc-python3.6-PyUtilib-5.6.2.drv' failed with exit code 1
error: build of '/nix/store/z2b5nxy01cdns11kk8dhp1idraars3lc-python3.6-PyUtilib-5.6.2.drv' failed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, that's a mistake on their side probably: https://github.com/PyUtilib/pyutilib/blob/master/setup.py#L42
Please also note the additional requirements for Python 2. I just saw that's only for python<2.7 which isn't available in Nixpkgs. So no additional dependencies.
sha256 = "08hgpf8fs8n8zlpmv3zlcgdw6306ymq1m9ma92v3x5nqnkhqfa3j"; | ||
}; | ||
|
||
doCheck = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
description = '' | ||
Pyomo is a Python-based, open-source optimization modeling language | ||
with a diverse set of optimization capabilities. | ||
''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doCheck = false; | ||
|
||
meta = with lib; { | ||
homepage = "http://www.pyomo.org/"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no quotes
doCheck = false; | ||
|
||
meta = with lib; { | ||
homepage = "https://github.com/PyUtilib/pyutilib"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no quotes
pkgs/top-level/python-packages.nix
Outdated
pyomo = callPackage ../development/python-modules/pyomo { }; | ||
|
||
pyutilib = callPackage ../development/python-modules/pyutilib { }; | ||
|
||
pyproj = callPackage ../development/python-modules/pyproj { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pyproj
definitely belongs above pyutilib
. The attributes should be ordered alphabetically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right... but well python-packages.nix
is a mess.
Even if pyutillib
goes after pyproj
, there are for example repoze_who
and vobject
before pyproj
, and kaa-base
and mmpython
after pyproj
.
That make it quite tricky to find the right position.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but we can still try
Please prefix your commit messages with |
Thanks for the review, I pushed changes that should address most of the concerns. |
sha256 = "08hgpf8fs8n8zlpmv3zlcgdw6306ymq1m9ma92v3x5nqnkhqfa3j"; | ||
}; | ||
|
||
# Tests try to install packages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably means you have to add them to checkInputs
.
|
||
meta = with lib; { | ||
homepage = https://github.com/PyUtilib/pyutilib; | ||
description = "collection of Python utilities"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalize
}; | ||
|
||
# Tests requires text files that are not included in the pypi package | ||
doCheck = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could try to use fetchFromGitHub
then, but it's up to you.
Motivation for this change
Add pyomo to nixpkgs, also add PyUtilib as a dependency.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)