-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Python package set bootstrap update #232451
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
Changes from all commits
850eae1
61836dc
7203705
78ee28c
c973046
2759ff2
3fab6e2
0cac949
d01f392
e0feae2
f3166d2
9075feb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,7 @@ buildPythonPackage rec { | |
| repo = "flit"; | ||
| rev = version; | ||
| hash = "sha256-iXf9K/xI4u+dDV0Zf6S08nbws4NqycrTEW0B8/qCjQc="; | ||
| name = "${pname}-${version}-source"; | ||
|
Comment on lines
27
to
+28
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just tried it locally and that does not change the hash which is really surprising to me because I always thought it did. Only the store path changed. |
||
| }; | ||
|
|
||
| nativeBuildInputs = [ | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -1,36 +1,64 @@ | ||||
| { lib | ||||
| , buildPythonPackage | ||||
| , pythonOlder | ||||
| , fetchFromGitHub | ||||
| , pytestCheckHook | ||||
|
|
||||
| # bootstrap | ||||
| , flit-core | ||||
| , python | ||||
|
|
||||
| # tests | ||||
| , installer | ||||
| , mock | ||||
| , pytestCheckHook | ||||
| }: | ||||
|
|
||||
| buildPythonPackage rec { | ||||
| pname = "installer"; | ||||
| version = "0.7.0"; | ||||
| format = "pyproject"; | ||||
| format = "other"; | ||||
|
|
||||
| src = fetchFromGitHub { | ||||
| owner = "pradyunsg"; | ||||
| repo = pname; | ||||
| rev = version; | ||||
| repo = "installer"; | ||||
| rev = "refs/tags/${version}"; | ||||
| hash = "sha256-thHghU+1Alpay5r9Dc3v7ATRFfYKV8l9qR0nbGOOX/A="; | ||||
| }; | ||||
|
|
||||
| nativeBuildInputs = [ flit-core ]; | ||||
| nativeBuildInputs = [ | ||||
| flit-core | ||||
| ]; | ||||
|
|
||||
| dontBuild = true; | ||||
|
|
||||
| installPhase = '' | ||||
| runHook preInstall | ||||
| ls -lah | ||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
| mkdir -p $out/${python.sitePackages} | ||||
| cp -a src/installer* $out/${python.sitePackages} | ||||
| ${python.interpreter} -m compileall $out/${python.sitePackages} | ||||
| runHook postInstall | ||||
| ''; | ||||
|
|
||||
| pythonImportsCheck = [ | ||||
| "installer" | ||||
| ]; | ||||
|
|
||||
| doCheck = false; | ||||
|
|
||||
| nativeCheckInputs = [ | ||||
| pytestCheckHook | ||||
| mock | ||||
| pytestCheckHook | ||||
| ]; | ||||
|
|
||||
| passthru.tests = { | ||||
| pytest = installer.overridePythonAttrs (oldAttrs: { doCheck = true; }); | ||||
| }; | ||||
|
|
||||
| meta = with lib; { | ||||
| changelog = "https://github.com/pypa/installer/blob/${src.rev}/docs/changelog.md"; | ||||
| homepage = "https://github.com/pradyunsg/installer"; | ||||
| description = "A low-level library for installing a Python package from a wheel distribution"; | ||||
| license = licenses.mit; | ||||
| maintainers = with maintainers; [ cpcloud fridh ]; | ||||
| maintainers = teams.python.members; | ||||
| }; | ||||
| } | ||||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1,7 +1,13 @@ | ||||||||
| { lib | ||||||||
| , buildPythonPackage | ||||||||
| , fetchPypi | ||||||||
|
|
||||||||
| # build | ||||||||
| , flit-core | ||||||||
| , installer | ||||||||
| , python | ||||||||
|
|
||||||||
| # tests | ||||||||
| , pytestCheckHook | ||||||||
| , pythonOlder | ||||||||
| , setuptools | ||||||||
|
|
@@ -12,25 +18,40 @@ | |||||||
| buildPythonPackage rec { | ||||||||
| pname = "pyproject-hooks"; | ||||||||
| version = "1.0.0"; | ||||||||
| format = "pyproject"; | ||||||||
| format = "other"; | ||||||||
|
|
||||||||
| disabled = pythonOlder "3.7"; | ||||||||
|
|
||||||||
| src = fetchPypi rec { | ||||||||
| src = fetchPypi { | ||||||||
| pname = "pyproject_hooks"; | ||||||||
| inherit version; | ||||||||
| hash = "sha256-8nGymLl/WVXVP7ErcsH7GUjCLBprcLMVxUztrKAmTvU="; | ||||||||
| }; | ||||||||
|
|
||||||||
| nativeBuildInputs = [ | ||||||||
| flit-core | ||||||||
| installer | ||||||||
| ]; | ||||||||
|
|
||||||||
| propagatedBuildInputs = [ | ||||||||
| ] ++ lib.optionals (pythonOlder "3.11") [ | ||||||||
|
Comment on lines
36
to
37
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
nit |
||||||||
| tomli | ||||||||
| ]; | ||||||||
|
|
||||||||
| buildPhase = '' | ||||||||
| runHook preBuild | ||||||||
| ${python.interpreter} -m flit_core.wheel | ||||||||
| runHook postBuild | ||||||||
| ''; | ||||||||
|
|
||||||||
| installPhase = '' | ||||||||
| runHook preInstall | ||||||||
| ${python.interpreter} -m installer --prefix "$out" dist/*.whl | ||||||||
| runHook postInstall | ||||||||
| ''; | ||||||||
|
|
||||||||
| doCheck = false; | ||||||||
|
|
||||||||
| nativeCheckInputs = [ | ||||||||
| pytestCheckHook | ||||||||
| setuptools | ||||||||
|
|
@@ -52,6 +73,6 @@ buildPythonPackage rec { | |||||||
| homepage = "https://github.com/pypa/pyproject-hooks"; | ||||||||
| changelog = "https://github.com/pypa/pyproject-hooks/blob/v${version}/docs/changelog.rst"; | ||||||||
| license = licenses.mit; | ||||||||
| maintainers = with maintainers; [ hexa ]; | ||||||||
| maintainers = teams.python.members; | ||||||||
| }; | ||||||||
| } | ||||||||
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 we need forBuild here?