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

Fix paperless and other Python pkgs #97283

Merged
merged 3 commits into from Sep 10, 2020
Merged

Conversation

erikarvstedt
Copy link
Member

@erikarvstedt erikarvstedt commented Sep 6, 2020

This fixes:

  • django_extensions. The old version was incompatible with the newly updated version of factory_boy,
  • django-picklefield: The source was missing test files.
  • paperless: The pkg needed older versions of factory_boy and django_extensions.
    This also fixes the corresponding NixOS test.

This is the complete closure of dependents/referrers of all changed pkgs:

django_extensions -----------------\
                                    |---> hyperkitty
django-picklefield --> django-q  --/

paperless --> (none, leaf node)

All pkgs in this graph are now building again. This PR is strictly fixing pkgs and introduces no new breakage.

@seppeljordan
Copy link
Contributor

Result of nixpkgs-review pr 97283 1

11 packages built:
- mailman-web (python38Packages.mailman-web)
- paperless
- python37Packages.django-picklefield
- python37Packages.django-q
- python37Packages.django_extensions
- python37Packages.hyperkitty
- python37Packages.mailman-web
- python38Packages.django-picklefield
- python38Packages.django-q
- python38Packages.django_extensions
- python38Packages.hyperkitty

@@ -0,0 +1,34 @@
pyPkgs: fetchFromGitHub:
{
django_2_0 = pyPkgs.django_2_2.overrideDerivation (_: rec {
Copy link
Contributor

Choose a reason for hiding this comment

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

overrideDerivation should be avoided, please use overrideAttrs, or in the case of python packages, overridePythonAttrs

Comment on lines 14 to 24
# The PyPi source is missing test files
doCheck = false;

Copy link
Contributor

Choose a reason for hiding this comment

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

There are no tests included. Please try to checkout from source and check if they have unit tests, and try to run them. Unit tests give a good indication that they package has a high degree of validity and correctness given the python package set.

If tests are not available, then please use pythonImportsCheck to import the most important modules. This isn't as good as unit tests, but will usually give a good indication of run-time errors. Please see pythonImportsCheck documentation for more information.

checkInputs = [ pytest pytest-django ];

checkPhase = ''
PYTHONPATH="$(pwd):$PYTHONPATH" \
Copy link
Contributor

Choose a reason for hiding this comment

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

this is default behavior of python, but doesn't really affect the build

Copy link
Member Author

Choose a reason for hiding this comment

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

No, when removing PYTHONPATH="$(pwd):$PYTHONPATH", the test fails with ImportError: No module named 'tests'.

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 97283 1

11 packages built:
  • mailman-web (python38Packages.mailman-web)
  • paperless
  • python37Packages.django-picklefield
  • python37Packages.django-q
  • python37Packages.django_extensions
  • python37Packages.hyperkitty
  • python37Packages.mailman-web
  • python38Packages.django-picklefield
  • python38Packages.django-q
  • python38Packages.django_extensions
  • python38Packages.hyperkitty

@jonringer jonringer merged commit 684496c into NixOS:master Sep 10, 2020
@jonringer jonringer added the 9.needs: port to stable A PR needs a backport to the stable release. label Sep 10, 2020
@jonringer
Copy link
Contributor

please backport this :)

@jonringer
Copy link
Contributor

ZHF: #97479

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

3 participants