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

Unbreak paperspace #102424

Merged
merged 5 commits into from Nov 7, 2020
Merged

Unbreak paperspace #102424

merged 5 commits into from Nov 7, 2020

Conversation

freezeboy
Copy link
Contributor

Motivation for this change

Add several python packages to be able to unbreak paperspace

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.

@omasanori
Copy link
Contributor

omasanori commented Nov 2, 2020

Result of nixpkgs-review pr 102424 1

1 package failed to build:
  • python27Packages.gradient_statsd
builder for '/nix/store/qfp3j1yyvkhibsr9qfssjp6p3d24cm35-python2.7-gradient_statsd-1.0.1.drv' failed with exit code 1; last 10 log lines:
  Requirement already satisfied: datadog>=0.26.0 in /nix/store/847q70f1cclrs441rgbn5igyv49g71i0-python2.7-datadog-0.39.0/lib/python2.7/site-packages (from gradient-statsd==1.0.1) (0.39.0)
  Requirement already satisfied: chardet>=3.0.4 in /nix/store/avvzmzbbyaha9kg865zjpi35s9idksym-python2.7-chardet-3.0.4/lib/python2.7/site-packages (from gradient-statsd==1.0.1) (3.0.4)
  Requirement already satisfied: decorator>=4.3.2 in /nix/store/f0wkld91i19w2vrivl0nanwzbah5fcks-python2.7-decorator-4.4.2/lib/python2.7/site-packages (from gradient-statsd==1.0.1) (4.4.2)
  Requirement already satisfied: urllib3>=1.24.1 in /nix/store/i1jqvan7sn5bxwngw5cgm6wybwdm88lg-python2.7-urllib3-1.25.10/lib/python2.7/site-packages (from gradient-statsd==1.0.1) (1.25.10)
  Requirement already satisfied: idna>=2.8 in /nix/store/ai65krn0di5d8vq9zp9wyl0mgs3svb4g-python2.7-idna-2.10/lib/python2.7/site-packages (from gradient-statsd==1.0.1) (2.10)
  Requirement already satisfied: requests>=2.21.0 in /nix/store/1ch0p36m9n2a5q98mvjssqrixziq0y9y-python2.7-requests-2.24.0/lib/python2.7/site-packages (from gradient-statsd==1.0.1) (2.24.0)
  Requirement already satisfied: certifi>=2018.11.29 in /nix/store/h3alaag0nka7jb89d6bkh2claikxsahl-python2.7-certifi-2020.6.20/lib/python2.7/site-packages (from gradient-statsd==1.0.1) (2020.6.20)
  Requirement already satisfied: typing; python_version < "3.5" in /nix/store/wq7m19nxc4x7a4cg1k3cvqkxmdlvqa85-python2.7-typing-3.7.4.3/lib/python2.7/site-packages (from datadog>=0.26.0->gradient-statsd==1.0.1) (3.7.4.3)
  ERROR: Could not find a version that satisfies the requirement configparser<5; python_version < "3.0" (from datadog>=0.26.0->gradient-statsd==1.0.1) (from versions: none)
  ERROR: No matching distribution found for configparser<5; python_version < "3.0" (from datadog>=0.26.0->gradient-statsd==1.0.1)
11 packages built:
  • python27Packages.click-help-colors
  • python37Packages.click-help-colors
  • python37Packages.gradient_sdk
  • python37Packages.gradient_statsd
  • python37Packages.hyperopt
  • python37Packages.paperspace
  • python38Packages.click-help-colors
  • python38Packages.gradient_sdk
  • python38Packages.gradient_statsd
  • python38Packages.hyperopt
  • python38Packages.paperspace

@freezeboy
Copy link
Contributor Author

Fixed the broken package and added suggested tests

@omasanori
Copy link
Contributor

Result of nixpkgs-review pr 102424 1

12 packages built:
  • python27Packages.click-help-colors
  • python27Packages.gradient_statsd
  • python37Packages.click-help-colors
  • python37Packages.gradient_sdk
  • python37Packages.gradient_statsd
  • python37Packages.hyperopt
  • python37Packages.paperspace
  • python38Packages.click-help-colors
  • python38Packages.gradient_sdk
  • python38Packages.gradient_statsd
  • python38Packages.hyperopt
  • python38Packages.paperspace

Copy link
Contributor

@omasanori omasanori left a comment

Choose a reason for hiding this comment

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

While the current changes work, I'd suggest to disable Python 2 builds instead of fixing them.

@@ -0,0 +1,29 @@
{ stdenv, fetchPypi, buildPythonPackage
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
{ stdenv, fetchPypi, buildPythonPackage
{ stdenv, fetchPypi, buildPythonPackage, isPy3k

buildPythonPackage rec {
pname = "click-help-colors";
version = "0.8";

Copy link
Contributor

@omasanori omasanori Nov 2, 2020

Choose a reason for hiding this comment

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

Suggested change
disabled = !isPy3k;

@@ -0,0 +1,26 @@
{ lib, stdenv, fetchPypi, buildPythonPackage
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
{ lib, stdenv, fetchPypi, buildPythonPackage
{ lib, stdenv, fetchPypi, buildPythonPackage, isPy3k

buildPythonPackage rec {
pname = "gradient_statsd";
version = "1.0.1";

Copy link
Contributor

@omasanori omasanori Nov 2, 2020

Choose a reason for hiding this comment

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

Suggested change
disabled = !isPy3k;

Comment on lines +14 to +15
propagatedBuildInputs = [ requests datadog ]
++ lib.optional python.isPy2 configparser;
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
propagatedBuildInputs = [ requests datadog ]
++ lib.optional python.isPy2 configparser;
propagatedBuildInputs = [ requests datadog ];

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

LGTM

Result of nixpkgs-review pr 102424 1

12 packages built:
  • python27Packages.click-help-colors
  • python27Packages.gradient_statsd
  • python37Packages.click-help-colors
  • python37Packages.gradient_sdk
  • python37Packages.gradient_statsd
  • python37Packages.hyperopt
  • python37Packages.paperspace
  • python38Packages.click-help-colors
  • python38Packages.gradient_sdk
  • python38Packages.gradient_statsd
  • python38Packages.hyperopt
  • python38Packages.paperspace

@jonringer jonringer merged commit c0efa71 into NixOS:master Nov 7, 2020
@freezeboy freezeboy deleted the unbreak-paperspace branch November 7, 2020 19:35
@jonringer
Copy link
Contributor

@omasanori he already did the work to make those builds work. But you're right, python2 is probably not a worthwhile platform to support.

@omasanori
Copy link
Contributor

@jonringer Sure, it makes sense to merge anyway.

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Nov 10, 2020

Result of nixpkgs-review pr 102424 run on x86_64-darwin 1

5 packages failed to build:
  • python27Packages.gradient_statsd
  • python37Packages.gradient_statsd
  • python37Packages.paperspace
  • python38Packages.gradient_statsd
  • python38Packages.paperspace
7 packages built:
  • python27Packages.click-help-colors
  • python37Packages.click-help-colors
  • python37Packages.gradient_sdk
  • python37Packages.hyperopt
  • python38Packages.click-help-colors
  • python38Packages.gradient_sdk
  • python38Packages.hyperopt

Edit: false positive, they build...

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