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.patator: init at 0.7 #34642
Conversation
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.
name
is not necessary for buildPython*
anymore. Please remove it
dnspython | ||
IPy | ||
pysnmp | ||
pyasn1 |
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.
indentation
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.
Thanks, I fix this in next commit =)
pkgs/top-level/python-packages.nix
Outdated
}; | ||
IPy = callPackage ../development/python-modules/IPy { }; | ||
# Alias to remove | ||
ipy = callPackage ../development/python-modules/IPy { }; |
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's wrong with the old name? Most attributes in Nixpkgs are lowercase.
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.
Don't know what's better between the real name (as a lots of packages), or all in lowercase. I think, in pypi you can have two different packages with the same name except but different capitalized letters.
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, that's not true. The attributes are preferably the normalized names, so ipy
in this case.
https://www.python.org/dev/peps/pep-0503/#normalized-names
}; | ||
|
||
checkPhase = '' | ||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/12.2/client64/lib |
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.
❓
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.
If we don't do that, cx_Oracle don't find Oracle libs :/
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 are referring to a path outside the store. That is incorrect. Furthermore, paths to libraries are better hardcoded. Also, something should run in the checkPhase
.
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.
Okay, Is there a good way to handle the path?
sha256 = "335e432e6cc591437e316ba8c1da935484ca39fc79e595ccf60ccd9166e965f1"; | ||
}; | ||
|
||
propagatedBuildInputs = with python3Packages; [ |
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.
Please add the dependencies as arguments instead of python3Packages
.
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 not. What's the difference ?
buildPythonPackage rec { | ||
pname = "IPy"; | ||
version = "0.83"; | ||
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.
The name
attribute is added by buildPython*
and should therefore be removed.
buildPythonPackage rec { | ||
pname = "ajpy"; | ||
version = "0.0.2"; | ||
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.
The name
attribute is added by buildPython*
and should therefore be removed.
buildPythonPackage rec { | ||
pname = "cx_Oracle"; | ||
version = "6.1"; | ||
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.
The name
attribute is added by buildPython*
and should therefore be removed.
}; | ||
|
||
checkPhase = '' | ||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/12.2/client64/lib |
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 are referring to a path outside the store. That is incorrect. Furthermore, paths to libraries are better hardcoded. Also, something should run in the checkPhase
.
buildPythonPackage rec { | ||
pname = "mysqlclient"; | ||
version = "1.3.12"; | ||
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.
The name
attribute is added by buildPython*
and should therefore be removed.
buildPythonPackage rec { | ||
pname = "patator"; | ||
version = "0.7"; | ||
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.
The name
attribute is added by buildPython*
and should therefore be removed.
@@ -0,0 +1,35 @@ | |||
{ stdenv, buildPythonPackage, isPy3k, python3Packages, fetchPypi }: |
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.
Don't pass in the package set; instead pass in individual requirements.
pkgs/top-level/python-packages.nix
Outdated
}; | ||
IPy = callPackage ../development/python-modules/IPy { }; | ||
# Alias to remove | ||
ipy = callPackage ../development/python-modules/IPy { }; |
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, that's not true. The attributes are preferably the normalized names, so ipy
in this case.
https://www.python.org/dev/peps/pep-0503/#normalized-names
Hope the changes requested are well fixed. |
You're still not running any checks in the |
Woops you are right. In fact, it seems that cx_Oracle tests need an Oracle database running in background. I think it will be better to pass the test if we don't want an error |
Yes, if it needs a database, then you can set |
Now, it would be nice if you replaced your 11 commits by 5, one for each package. |
42846ea
to
537afb8
Compare
Ok, I think it's good now. |
Very nice. Thank you! I'll try to build them... @GrahamcOfBorg build python2.pkgs.ipy python3.pkgs.ipy |
Failure on aarch64-linux (full log) Partial log (click to expand)
|
Success on x86_64-linux (full log) Partial log (click to expand)
|
Failure on x86_64-linux (full log) Partial log (click to expand)
|
Success on x86_64-linux (full log) Partial log (click to expand)
|
Failure on x86_64-linux (full log) Partial log (click to expand)
|
Success on aarch64-linux (full log) Partial log (click to expand)
|
Success on x86_64-linux (full log) Partial log (click to expand)
|
Failure on aarch64-linux (full log) Partial log (click to expand)
|
Failure on aarch64-linux (full log) Partial log (click to expand)
|
Success on aarch64-linux (full log) Partial log (click to expand)
|
Do ajpy and mysqlclient provide tests? If so, you should specify the appropriate Regarding ipy, the tests don't seem to run there as well. Do you have an idea why? |
Ajpy, patator doesn't seems to got tests. |
A dependency can't be built: nix build python3.pkgs.cx_oracle -f .
builder for '/nix/store/6k80zw21b9chd00lqya0vfj03y8s91xw-oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm.drv' failed to produce output path '/nix/store/3ly42sshg74lqk1vw2fksagq6zd3sz0g-oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm'
cannot build derivation '/nix/store/1g1bbai4y39zx3b4y26c2waip8ymygdf-oracle-instantclient-12.2.0.1.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/pqy6859y8xs0gkd5758faz28aff6300d-python3.6-cx_Oracle-6.1.drv': 1 dependencies couldn't be built
[0 built (1 failed)]
error: build of '/nix/store/pqy6859y8xs0gkd5758faz28aff6300d-python3.6-cx_Oracle-6.1.drv' failed |
Can this error be made because of oracle-instantclient license ? It correctly build on my laptop when oracle-instantclient is installed (package that I don't handle) |
Right, it needs prefetching. That important part was not visible in the |
So do I have to do something else to get the package merged ? |
@FRidh This looks fine, doesn't it? I did however not test if it works. |
ping @FRidh |
Motivation for this change
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)