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

python311Packages.mozilla-django-oidc: init at 4.0.1; peering-manager: add oidc support #278982

Merged
merged 2 commits into from
Jun 28, 2024
Merged

Conversation

felbinger
Copy link
Member

@felbinger felbinger commented Jan 5, 2024

Description of changes

Packaged mozilla-django-oidc which is a requirement of peering-manager when using oidc (see documentation).
Added oidc configuration options to peering-manager.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: python 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Jan 5, 2024
@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label Jan 5, 2024
@felbinger
Copy link
Member Author

felbinger commented Jan 5, 2024

Problem with openssl - solved I'm still tryin to figure out how to install openssl...
Jan 05 19:55:40 netbox gunicorn[21935]: Traceback (most recent call last):
Jan 05 19:55:40 netbox gunicorn[21935]:   File "/nix/store/2cpaym60w5gm96wbfj4bwm0802q16py6-python3.11-gunicorn-21.2.0/lib/python3.11/site-packages/gunicorn/arbiter.py", line 609, in spawn_worker
Jan 05 19:55:40 netbox gunicorn[21935]:     worker.init_process()
Jan 05 19:55:40 netbox gunicorn[21935]:   File "/nix/store/2cpaym60w5gm96wbfj4bwm0802q16py6-python3.11-gunicorn-21.2.0/lib/python3.11/site-packages/gunicorn/workers/base.py", line 134, in init_process
Jan 05 19:55:40 netbox gunicorn[21935]:     self.load_wsgi()
Jan 05 19:55:40 netbox gunicorn[21935]:   File "/nix/store/2cpaym60w5gm96wbfj4bwm0802q16py6-python3.11-gunicorn-21.2.0/lib/python3.11/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
Jan 05 19:55:40 netbox gunicorn[21935]:     self.wsgi = self.app.wsgi()
Jan 05 19:55:40 netbox gunicorn[21935]:                 ^^^^^^^^^^^^^^^
Jan 05 19:55:40 netbox gunicorn[21935]:   File "/nix/store/2cpaym60w5gm96wbfj4bwm0802q16py6-python3.11-gunicorn-21.2.0/lib/python3.11/site-packages/gunicorn/app/base.py", line 67, in wsgi
Jan 05 19:55:40 netbox gunicorn[21935]:     self.callable = self.load()
Jan 05 19:55:40 netbox gunicorn[21935]:                     ^^^^^^^^^^^
Jan 05 19:55:40 netbox gunicorn[21935]:   File "/nix/store/2cpaym60w5gm96wbfj4bwm0802q16py6-python3.11-gunicorn-21.2.0/lib/python3.11/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
Jan 05 19:55:40 netbox gunicorn[21935]:     return self.load_wsgiapp()
Jan 05 19:55:40 netbox gunicorn[21935]:            ^^^^^^^^^^^^^^^^^^^
Jan 05 19:55:40 netbox gunicorn[21935]:   File "/nix/store/2cpaym60w5gm96wbfj4bwm0802q16py6-python3.11-gunicorn-21.2.0/lib/python3.11/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
Jan 05 19:55:40 netbox gunicorn[21935]:     return util.import_app(self.app_uri)
Jan 05 19:55:40 netbox gunicorn[21935]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 05 19:55:40 netbox gunicorn[21935]:   File "/nix/store/2cpaym60w5gm96wbfj4bwm0802q16py6-python3.11-gunicorn-21.2.0/lib/python3.11/site-packages/gunicorn/util.py", line 371, in import_app
Jan 05 19:55:40 netbox gunicorn[21935]:     mod = importlib.import_module(module)
Jan 05 19:55:40 netbox gunicorn[21935]:           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 05 19:55:40 netbox gunicorn[21935]:   File "/nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/python3.11/importlib/__init__.py", line 126, in import_module
Jan 05 19:55:40 netbox gunicorn[21935]:     return _bootstrap._gcd_import(name[level:], package, level)
Jan 05 19:55:40 netbox gunicorn[21935]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 05 19:55:40 netbox gunicorn[21935]:   File "", line 1204, in _gcd_import
Jan 05 19:55:40 netbox gunicorn[21935]:   File "", line 1176, in _find_and_load
Jan 05 19:55:40 netbox gunicorn[21935]:   File "", line 1147, in _find_and_load_unlocked
Jan 05 19:55:40 netbox gunicorn[21935]:   File "", line 690, in _load_unlocked
Jan 05 19:55:40 netbox gunicorn[21935]:   File "", line 940, in exec_module
Jan 05 19:55:40 netbox gunicorn[21935]:   File "", line 241, in _call_with_frames_removed
Jan 05 19:55:40 netbox gunicorn[21935]:   File "/nix/store/8rag7izykzf0ksyv3m7pal1c6wdf3qnj-peering-manager-1.8.2/opt/peering-manager/peering_manager/wsgi.py", line 16, in 
Jan 05 19:55:40 netbox gunicorn[21935]:     application = get_wsgi_application()
Jan 05 19:55:40 netbox gunicorn[21935]:                   ^^^^^^^^^^^^^^^^^^^^^^
Jan 05 19:55:40 netbox gunicorn[21935]:   File "/nix/store/yqxwxb7a1y1zj0fwi4ra4fzbjlpbvk6q-python3.11-Django-4.2.7/lib/python3.11/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
Jan 05 19:55:40 netbox gunicorn[21935]:     return WSGIHandler()
Jan 05 19:55:40 netbox gunicorn[21935]:            ^^^^^^^^^^^^^
Jan 05 19:55:40 netbox gunicorn[21935]:   File "/nix/store/yqxwxb7a1y1zj0fwi4ra4fzbjlpbvk6q-python3.11-Django-4.2.7/lib/python3.11/site-packages/django/core/handlers/wsgi.py", line 118, in __init__
Jan 05 19:55:40 netbox gunicorn[21935]:     self.load_middleware()
Jan 05 19:55:40 netbox gunicorn[21935]:   File "/nix/store/yqxwxb7a1y1zj0fwi4ra4fzbjlpbvk6q-python3.11-Django-4.2.7/lib/python3.11/site-packages/django/core/handlers/base.py", line 40, in load_middleware
Jan 05 19:55:40 netbox gunicorn[21935]:     middleware = import_string(middleware_path)
Jan 05 19:55:40 netbox gunicorn[21935]:                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 05 19:55:40 netbox gunicorn[21935]:   File "/nix/store/yqxwxb7a1y1zj0fwi4ra4fzbjlpbvk6q-python3.11-Django-4.2.7/lib/python3.11/site-packages/django/utils/module_loading.py", line 30, in import_string
Jan 05 19:55:40 netbox gunicorn[21935]:     return cached_import(module_path, class_name)
Jan 05 19:55:40 netbox gunicorn[21935]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 05 19:55:40 netbox gunicorn[21935]:   File "/nix/store/yqxwxb7a1y1zj0fwi4ra4fzbjlpbvk6q-python3.11-Django-4.2.7/lib/python3.11/site-packages/django/utils/module_loading.py", line 15, in cached_import
Jan 05 19:55:40 netbox gunicorn[21935]:     module = import_module(module_path)
Jan 05 19:55:40 netbox gunicorn[21935]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 05 19:55:40 netbox gunicorn[21935]:   File "/nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/python3.11/importlib/__init__.py", line 126, in import_module
Jan 05 19:55:40 netbox gunicorn[21935]:     return _bootstrap._gcd_import(name[level:], package, level)
Jan 05 19:55:40 netbox gunicorn[21935]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 05 19:55:40 netbox gunicorn[21935]:   File "", line 1204, in _gcd_import
Jan 05 19:55:40 netbox gunicorn[21935]:   File "", line 1176, in _find_and_load
Jan 05 19:55:40 netbox gunicorn[21935]:   File "", line 1147, in _find_and_load_unlocked
Jan 05 19:55:40 netbox gunicorn[21935]:   File "", line 690, in _load_unlocked
Jan 05 19:55:40 netbox gunicorn[21935]:   File "", line 940, in exec_module
Jan 05 19:55:40 netbox gunicorn[21935]:   File "", line 241, in _call_with_frames_removed
Jan 05 19:55:40 netbox gunicorn[21935]:   File "/nix/store/2x272drmdsldbzqb7p1qhm0k3g13ybgn-python3.11-mozilla-django-oidc-2.0.0/lib/python3.11/site-packages/mozilla_django_oidc/middleware.py", line 12, in 
Jan 05 19:55:40 netbox gunicorn[21935]:     from mozilla_django_oidc.auth import OIDCAuthenticationBackend
Jan 05 19:55:40 netbox gunicorn[21935]:   File "/nix/store/2x272drmdsldbzqb7p1qhm0k3g13ybgn-python3.11-mozilla-django-oidc-2.0.0/lib/python3.11/site-packages/mozilla_django_oidc/auth.py", line 15, in 
Jan 05 19:55:40 netbox gunicorn[21935]:     from josepy.b64 import b64decode
Jan 05 19:55:40 netbox gunicorn[21935]:   File "/nix/store/bb2ah9gvjpv7fdn4hdacfvigh9j1vmc7-python3.11-josepy-1.13.0/lib/python3.11/site-packages/josepy/__init__.py", line 40, in 
Jan 05 19:55:40 netbox gunicorn[21935]:     from josepy.json_util import (
Jan 05 19:55:40 netbox gunicorn[21935]:   File "/nix/store/bb2ah9gvjpv7fdn4hdacfvigh9j1vmc7-python3.11-josepy-1.13.0/lib/python3.11/site-packages/josepy/json_util.py", line 14, in 
Jan 05 19:55:40 netbox gunicorn[21935]:     from OpenSSL import crypto
Jan 05 19:55:40 netbox gunicorn[21935]: ModuleNotFoundError: No module named 'OpenSSL'
Shouldn't this be a dependency of `josepy` already?

@felbinger felbinger changed the title python311Packages.mozilla-django-oidc: init & peering-manager: oidc support python311Packages.mozilla-django-oidc: init at 2.0.0 & peering-manager: add oidc support Jan 5, 2024
@felbinger felbinger changed the title python311Packages.mozilla-django-oidc: init at 2.0.0 & peering-manager: add oidc support python311Packages.mozilla-django-oidc: init at 2.0.0, peering-manager: add oidc support Jan 5, 2024
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Jan 5, 2024
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/oidc-support-for-peering-manager/37875/1

@felbinger felbinger changed the title python311Packages.mozilla-django-oidc: init at 2.0.0, peering-manager: add oidc support python311Packages.mozilla-django-oidc: init at 4.0.1, peering-manager: add oidc support Jun 5, 2024
@github-actions github-actions bot added the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label Jun 5, 2024
@felbinger felbinger closed this Jun 5, 2024
@felbinger
Copy link
Member Author

Whoops, this wasn't intended...

@felbinger felbinger reopened this Jun 5, 2024
@felbinger
Copy link
Member Author

I just noticed that the latest version of mozilla-django-oidc has been updated.
Even though the documentation of peering manager still installs 2.0.0. I will test if the new version is also working...

@felbinger
Copy link
Member Author

When trying to use build-system instead of nativeBuildInputs to build the python package, the build fails

Traceback (most recent call last):
  File "/nix/store/z42spfv8zgigkvd3m68j7hbzcj7dpahz-python3.11-pyproject-hooks-1.0.0/lib/python3.11/site-packages/pyproject_hooks/_impl.py", line 321, in _call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
  File "/nix/store/z42spfv8zgigkvd3m68j7hbzcj7dpahz-python3.11-pyproject-hooks-1.0.0/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
    obj = import_module(mod_path)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/yvhwsfbh4bc99vfvwpaa70m4yng4pvpz-python3-3.11.8/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "", line 1204, in _gcd_import
  File "", line 1176, in _find_and_load
  File "", line 1126, in _find_and_load_unlocked
  File "", line 241, in _call_with_frames_removed
  File "", line 1204, in _gcd_import
  File "", line 1176, in _find_and_load
  File "", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'setuptools'

@felbinger
Copy link
Member Author

Result of nixpkgs-review pr 278982 run on x86_64-linux 1

1 package blacklisted:
  • nixos-install-tools
4 packages built:
  • python311Packages.mozilla-django-oidc
  • python311Packages.mozilla-django-oidc.dist
  • python312Packages.mozilla-django-oidc
  • python312Packages.mozilla-django-oidc.dist

Any idea why the blacklisted package nixos-install-tools appears?

@ofborg ofborg bot added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 1-10 and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin labels Jun 5, 2024
@felbinger felbinger marked this pull request as ready for review June 5, 2024 18:47
@felbinger
Copy link
Member Author

It looks like it's working. Thanks a lot to you @NetaliDev for pointing me in the right direction.

@NetaliDev
Copy link
Member

You're welcome :D I have added OIDC support to our Peering-Manager at work today and stumbled over this PR and just shared my own solution :)

@felbinger
Copy link
Member Author

version 4.0.1 of mozilla-django-oidc does work for peering-manager.

@felbinger
Copy link
Member Author

@yu-re-ka what do you think about the proposed changes?

@felbinger
Copy link
Member Author

felbinger commented Jun 6, 2024

Python import error for tests; fixed by adjusting python path as suggested in yu-re-ka's comment
@nix { "action": "setPhase", "phase": "installCheckPhase" }
Running phase: installCheckPhase
Traceback (most recent call last):
  File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/bin/.django-admin-wrapped", line 9, in 
    sys.exit(execute_from_command_line())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/lib/python3.12/site-packages/django/core/management/commands/test.py", line 24, in run_from_argv
    super().run_from_argv(argv)
  File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/lib/python3.12/site-packages/django/core/management/base.py", line 404, in run_from_argv
    parser = self.create_parser(argv[0], argv[1])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/lib/python3.12/site-packages/django/core/management/base.py", line 367, in create_parser
    self.add_arguments(parser)
  File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/lib/python3.12/site-packages/django/core/management/commands/test.py", line 54, in add_arguments
    test_runner_class = get_runner(settings, self.test_runner)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/lib/python3.12/site-packages/django/test/utils.py", line 388, in get_runner
    test_runner_class = test_runner_class or settings.TEST_RUNNER
                                             ^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/lib/python3.12/site-packages/django/conf/__init__.py", line 102, in __getattr__
    self._setup(name)
  File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/lib/python3.12/site-packages/django/conf/__init__.py", line 89, in _setup
    self._wrapped = Settings(settings_module)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/lib/python3.12/site-packages/django/conf/__init__.py", line 217, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/c7ycrgwv039nqglbif98yggx211sdbcl-python3-3.12.3/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "", line 1387, in _gcd_import
  File "", line 1360, in _find_and_load
  File "", line 1310, in _find_and_load_unlocked
  File "", line 488, in _call_with_frames_removed
  File "", line 1387, in _gcd_import
  File "", line 1360, in _find_and_load
  File "", line 1324, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tests'
I don't know why this is not working...

@felbinger felbinger changed the title python311Packages.mozilla-django-oidc: init at 4.0.1, peering-manager: add oidc support python311Packages.bumpversion: init at 0.5.0; python311Packages.readthedocs-sphinx-search: init at 0.3.2; python311Packages.mozilla-django-oidc: init at 4.0.1, peering-manager: add oidc support Jun 6, 2024
@felbinger felbinger changed the title python311Packages.bumpversion: init at 0.5.0; python311Packages.readthedocs-sphinx-search: init at 0.3.2; python311Packages.mozilla-django-oidc: init at 4.0.1, peering-manager: add oidc support python311Packages.bumpversion: init at 0.5.0; python311Packages.readthedocs-sphinx-search: init at 0.3.2; python311Packages.mozilla-django-oidc: init at 4.0.1; peering-manager: add oidc support Jun 6, 2024
@yu-re-ka
Copy link
Contributor

yu-re-ka commented Jun 6, 2024

I will have a look in a bit

@felbinger
Copy link
Member Author

I will have a look in a bit

Thanks a lot. Take you're time :)

@yu-re-ka
Copy link
Contributor

yu-re-ka commented Jun 7, 2024

Do you mind if I push the fix directly to your branch?

@yu-re-ka
Copy link
Contributor

yu-re-ka commented Jun 7, 2024

What I did specifically to find the solution to this:

  • searched the nixpkgs checkout for other uses of the django-admin command
~/proj/nixpkgs $ rg django-admin
[...]
  • I saw that django-configurations also uses django-admin test for its checkPhase.

  • I saw that it also sets the PYTHONPATH to include the current directory, which makes sense in context of the error.

  • To make it more readable, I separated the variable exports into separate commands, but since I wanted to prevent leakage of these environment variables into the rest of the build process, I also added a subshell around the variable exports and the test run.

  • Then I also checked if the additional packages you added are actually required to run the tests, and it turns out they are not. sorry for the possibly misleading comment earlier, which was meant as "[If the packages are required to run the unit tests,] you should package them as well"

The resulting diff is this:

diff --git a/pkgs/development/python-modules/mozilla-django-oidc/default.nix b/pkgs/development/python-modules/mozilla-django-oidc/default.nix
index 46edc89f9cb5..af4ee41e9d2d 100644
--- a/pkgs/development/python-modules/mozilla-django-oidc/default.nix
+++ b/pkgs/development/python-modules/mozilla-django-oidc/default.nix
@@ -7,7 +7,6 @@
 , josepy
 , requests
 , cryptography
-, bumpversion
 , wheel
 , ipython
 , ipdb
@@ -18,7 +17,6 @@
 , flake8
 , sphinx
 , sphinx-rtd-theme
-, readthedocs-sphinx-search
 , importlib-metadata
 }:
 
@@ -41,7 +39,6 @@ buildPythonPackage rec {
   ];
 
   nativeCheckInputs = [
-    bumpversion
     wheel
     ipython
     ipdb
@@ -52,14 +49,17 @@ buildPythonPackage rec {
     flake8
     sphinx
     sphinx-rtd-theme
-    readthedocs-sphinx-search
     importlib-metadata
   ];
 
   checkPhase = ''
     runHook preCheck
 
-    DJANGO_SETTINGS_MODULE=tests.settings django-admin test
+    (
+    export PYTHONPATH=.:$PYTHONPATH
+    export DJANGO_SETTINGS_MODULE=tests.settings
+    django-admin test
+    )
 
     runHook postCheck
   '';

@felbinger
Copy link
Member Author

This looks much better. Any idea why the nixos-install-tools package is being updated by this pr?

Result of nixpkgs-review pr 278982 run on x86_64-linux 1

1 package blacklisted:
  • nixos-install-tools
12 packages built:
  • python311Packages.bumpversion
  • python311Packages.bumpversion.dist
  • python311Packages.mozilla-django-oidc
  • python311Packages.mozilla-django-oidc.dist
  • python311Packages.readthedocs-sphinx-search
  • python311Packages.readthedocs-sphinx-search.dist
  • python312Packages.bumpversion
  • python312Packages.bumpversion.dist
  • python312Packages.mozilla-django-oidc
  • python312Packages.mozilla-django-oidc.dist
  • python312Packages.readthedocs-sphinx-search
  • python312Packages.readthedocs-sphinx-search.dist

For now I'm going to keep the two additional packages, maybe someone else need them for anything...

Copy link
Contributor

@yu-re-ka yu-re-ka left a comment

Choose a reason for hiding this comment

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

Now we have the same issue of running the unit tests for readthedocs-sphinx-search and bumpversion 😬

@yu-re-ka
Copy link
Contributor

yu-re-ka commented Jun 8, 2024

I would also check once more if all the nativeCheckInputs are actually required, and only leave those which are

@felbinger
Copy link
Member Author

Just in case we need these later...

{ lib
, buildPythonPackage
, fetchFromGitHub
, isPy27
, setuptools
}:

buildPythonPackage rec {
  pname = "readthedocs-sphinx-search";
  version = "0.3.2";
  pyproject = true;

  disabled = isPy27;

  src = fetchFromGitHub {
    owner = "readthedocs";
    repo = "readthedocs-sphinx-search";
    rev = version;
    hash = "sha256-eFUd6oP258xJQyITWGFI/EGS2d7YJpUICVeZkgUYHXU=";
  };

  nativeBuildInputs = [
    setuptools
  ];

  meta = {
    description = "Enable search-as-you-type feature for docs hosted by RTD.";
    homepage = "https://github.com/readthedocs/readthedocs-sphinx-search";
    changelog = "https://github.com/readthedocs/readthedocs-sphinx-search/releases/tag/${src.rev}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ felbinger ];
  };
}
{ lib
, buildPythonPackage
, fetchFromGitHub
, isPy27
, setuptools
}:

buildPythonPackage rec {
  pname = "bumpversion";
  version = "0.5.0";
  pyproject = true;

  disabled = isPy27;

  src = fetchFromGitHub {
    owner = "peritus";
    repo = "bumpversion";
    rev = "v${version}";
    hash = "sha256-Ra3ZhsZhg5GLvIK7W3oqD1xOJkV+k9mLGzV0gJnoPw8=";
  };

  nativeBuildInputs = [
    setuptools
  ];

  meta = {
    description = "Version-bump your software with a single command";
    homepage = "https://github.com/peritus/bumpversion";
    changelog = "https://github.com/peritus/bumpversion/releases/tag/${src.rev}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ felbinger ];
  };
}

@felbinger felbinger changed the title python311Packages.bumpversion: init at 0.5.0; python311Packages.readthedocs-sphinx-search: init at 0.3.2; python311Packages.mozilla-django-oidc: init at 4.0.1; peering-manager: add oidc support python311Packages.mozilla-django-oidc: init at 4.0.1; peering-manager: add oidc support Jun 9, 2024
@felbinger
Copy link
Member Author

felbinger commented Jun 9, 2024

I would also check once more if all the nativeCheckInputs are actually required, and only leave those which are

Actually I don't think that any other package than djangorestframework is required. No idea what these shitty dev dependencies are, but they are not for testing... Thats why I asked, if I need to add all of them (include the two that weren't packaged before). Maybe I misunderstood what you meant... I'm going to push the thing with just django rest framework in it.

These had been added before...

, wheel
, ipython
, ipdb
, mock
, tox
, djangorestframework
, pre-commit
, flake8
, sphinx
, sphinx-rtd-theme
, importlib-metadata

@SuperSandro2000
Copy link
Member

please rebase

felbinger and others added 2 commits June 26, 2024 07:45
Co-authored-by: Yureka <[email protected]>
Co-authored-by: Sandro <[email protected]>
@github-actions github-actions bot removed the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label Jun 26, 2024
@felbinger
Copy link
Member Author

please rebase

@SuperSandro2000 done

@JohnRTitor
Copy link
Contributor

Result of nixpkgs-review pr 278982 run on x86_64-linux 1

2 packages blacklisted:
  • nixos-install-tools
  • tests.nixos-functions.nixos-test
4 packages built:
  • python311Packages.mozilla-django-oidc
  • python311Packages.mozilla-django-oidc.dist
  • python312Packages.mozilla-django-oidc
  • python312Packages.mozilla-django-oidc.dist

@JohnRTitor JohnRTitor merged commit 8808f7d into NixOS:master Jun 28, 2024
21 checks passed
@felbinger
Copy link
Member Author

@JohnRTitor Would it be possible to backport this to 24.05?

Copy link
Contributor

@JohnRTitor
Copy link
Contributor

Sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: python 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants