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

django-picklefield: Source from Github, fix test and build #97300

Closed
wants to merge 1 commit into from

Conversation

m1cr0man
Copy link
Contributor

@m1cr0man m1cr0man commented Sep 6, 2020

Motivation for this change

This package is required by mailman, and was failing to build, possibly since django 1_11 was dropped.

Things done

Sourced package from GitHub since the Pypi package did not contain any tests, and then configured checkPhase to run these tests.

  • 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.


# Taken from project's tox.ini
checkPhase = ''
python3 -m django test -v3 --settings=tests.settings
Copy link
Contributor

Choose a reason for hiding this comment

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

to support alt interpreters such as pypy

Suggested change
python3 -m django test -v3 --settings=tests.settings
${python.interpreter} -m django test -v3 --settings=tests.settings

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do I also need to add an import for this?

Copy link
Contributor

Choose a reason for hiding this comment

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

you would, if it's not already imported

src = fetchFromGitHub {
owner = "gintas";
repo = "django-picklefield";
rev = "4d5e3b2995df6597d45ad59d92ead38abc5c34af";
Copy link
Contributor

Choose a reason for hiding this comment

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

please use official releases

Suggested change
rev = "4d5e3b2995df6597d45ad59d92ead38abc5c34af";
rev = "v${version}";

https://github.com/gintas/django-picklefield/releases/tag/v3.0.1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I didn't realize I could batch suggestions. I've incorporated both in now.

@m1cr0man m1cr0man force-pushed the django-picklefield branch 2 times, most recently from 3aef150 to bec0913 Compare September 6, 2020 19:04
@@ -1,16 +1,25 @@
{ lib, buildPythonPackage, fetchPypi, django }:
{ lib, buildPythonPackage, fetchFromGitHub, django }:
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, buildPythonPackage, fetchFromGitHub, django }:
{ lib, buildPythonPackage, fetchFromGitHub, python, django }:

to fix eval

@m1cr0man
Copy link
Contributor Author

Fixed in #97283

@m1cr0man m1cr0man closed this Sep 15, 2020
@m1cr0man m1cr0man deleted the django-picklefield branch October 6, 2020 20:09
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

2 participants