diff --git a/pkgs/development/python2-modules/attrs/default.nix b/pkgs/development/python2-modules/attrs/default.nix deleted file mode 100644 index d2613cfcfb42..000000000000 --- a/pkgs/development/python2-modules/attrs/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchPypi, -}: - -buildPythonPackage rec { - pname = "attrs"; - version = "21.4.0"; - format = "setuptools"; - - src = fetchPypi { - inherit pname version; - hash = "sha256-YmuoI0IR25joad92IwoTfExAoS1yRFxF1fW3FvB24v0="; - }; - - outputs = [ - "out" - "testout" - ]; - - postInstall = '' - # Install tests as the tests output. - mkdir $testout - cp -R tests $testout/tests - ''; - - pythonImportsCheck = [ - "attr" - ]; - - # pytest depends on attrs, so we can't do this out-of-the-box. - # Instead, we do this as a passthru.tests test. - doCheck = false; - - meta = { - description = "Python attributes without boilerplate"; - homepage = "https://github.com/hynek/attrs"; - license = lib.licenses.mit; - maintainers = [ ]; - }; -} diff --git a/pkgs/development/python2-modules/backports-functools-lru-cache/default.nix b/pkgs/development/python2-modules/backports-functools-lru-cache/default.nix deleted file mode 100644 index 78a52491f1fc..000000000000 --- a/pkgs/development/python2-modules/backports-functools-lru-cache/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchPypi, - setuptools, - setuptools-scm, -}: - -buildPythonPackage rec { - pname = "backports-functools-lru-cache"; - version = "1.6.6"; - pyproject = true; - - src = fetchPypi { - pname = "backports.functools_lru_cache"; - inherit version; - hash = "sha256-e3DnAbpNtYwO2GcanTORsKu5vRvCTU6Qw0gPS6r8wtw="; - }; - - nativeBuildInputs = [ - setuptools - setuptools-scm - ]; - - # circular dependency: - # backports-functools-lru-cache -> pytest -> wc-width -> backports-functools-lru-cache - doCheck = false; - - pythonImportsCheck = [ - "backports.functools_lru_cache" - ]; - - meta = { - description = "Backport of functools.lru_cache"; - homepage = "https://github.com/jaraco/backports.functools_lru_cache"; - license = lib.licenses.mit; - }; -} diff --git a/pkgs/development/python2-modules/cffi/default.nix b/pkgs/development/python2-modules/cffi/default.nix deleted file mode 100644 index 52ed21c84918..000000000000 --- a/pkgs/development/python2-modules/cffi/default.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ - lib, - stdenv, - cffi, -}: - -if cffi == null then - null -else - cffi.overridePythonAttrs { - disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ - # cannot load library 'c' - "test_FILE" - "test_FILE_object" - "test_FILE_only_for_FILE_arg" - "test_load_and_call_function" - "test_load_library" - - # cannot load library 'dl' - "test_dlopen_handle" - - # cannot load library 'm' - "test_dir_on_dlopen_lib" - "test_dlclose" - "test_dlopen" - "test_dlopen_constant" - "test_dlopen_flags" - "test_function_typedef" - "test_line_continuation_in_defines" - "test_missing_function" - "test_remove_comments" - "test_remove_line_continuation_comments" - "test_simple" - "test_sin" - "test_sinf" - "test_stdcall_only_on_windows" - "test_wraps_from_stdlib" - - # MemoryError - "test_callback_as_function_argument" - "test_callback_crash" - "test_callback_decorator" - "test_callback_large_struct" - "test_callback_returning_void" - "test_cast_functionptr_and_int" - "test_function_pointer" - "test_functionptr_intptr_return" - "test_functionptr_simple" - "test_functionptr_void_return" - "test_functionptr_voidptr_return" - ]; - } diff --git a/pkgs/development/python2-modules/configparser/default.nix b/pkgs/development/python2-modules/configparser/default.nix deleted file mode 100644 index 679d19c59f47..000000000000 --- a/pkgs/development/python2-modules/configparser/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ - lib, - stdenv, - buildPythonPackage, - fetchPypi, - setuptools-scm, -}: - -buildPythonPackage rec { - pname = "configparser"; - version = "4.0.2"; - format = "setuptools"; - - src = fetchPypi { - inherit pname version; - sha256 = "c7d282687a5308319bf3d2e7706e575c635b0a470342641c93bea0ea3b5331df"; - }; - - # No tests available - doCheck = false; - - nativeBuildInputs = [ setuptools-scm ]; - - preConfigure = '' - export LC_ALL=${if stdenv.hostPlatform.isDarwin then "en_US" else "C"}.UTF-8 - ''; - - meta = { - description = "Updated configparser from Python 3.7 for Python 2.6+"; - license = lib.licenses.mit; - homepage = "https://github.com/jaraco/configparser"; - }; -} diff --git a/pkgs/development/python2-modules/contextlib2/default.nix b/pkgs/development/python2-modules/contextlib2/default.nix deleted file mode 100644 index 273fd278c528..000000000000 --- a/pkgs/development/python2-modules/contextlib2/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchPypi, -}: - -buildPythonPackage rec { - pname = "contextlib2"; - version = "0.6.0.post1"; - format = "setuptools"; - - src = fetchPypi { - inherit pname version; - sha256 = "01f490098c18b19d2bd5bb5dc445b2054d2fa97f09a4280ba2c5f3c394c8162e"; - }; - - # requires unittest2, which has been removed - doCheck = false; - - meta = { - description = "Backports and enhancements for the contextlib module"; - homepage = "https://contextlib2.readthedocs.org/"; - license = lib.licenses.psfl; - }; -} diff --git a/pkgs/development/python2-modules/coverage/default.nix b/pkgs/development/python2-modules/coverage/default.nix deleted file mode 100644 index 7bf3247d8768..000000000000 --- a/pkgs/development/python2-modules/coverage/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchPypi, - mock, -}: - -buildPythonPackage rec { - pname = "coverage"; - version = "5.5"; - format = "setuptools"; - - src = fetchPypi { - inherit pname version; - sha256 = "ebe78fe9a0e874362175b02371bdfbee64d8edc42a044253ddf4ee7d3c15212c"; - }; - - # No tests in archive - doCheck = false; - nativeCheckInputs = [ mock ]; - - meta = { - description = "Code coverage measurement for python"; - homepage = "https://coverage.readthedocs.io/"; - license = lib.licenses.bsd3; - }; -} diff --git a/pkgs/development/python2-modules/filelock/default.nix b/pkgs/development/python2-modules/filelock/default.nix deleted file mode 100644 index 8f6358ffd654..000000000000 --- a/pkgs/development/python2-modules/filelock/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchPypi, - setuptools-scm, -}: - -buildPythonPackage rec { - pname = "filelock"; - version = "3.2.1"; - format = "setuptools"; - - src = fetchPypi { - inherit pname version; - sha256 = "1qry67zv2pmz8px6wdfbjqv75nmryy2ac7asqgs6q6db2722kpcw"; - }; - - nativeBuildInputs = [ - setuptools-scm - ]; - - meta = { - homepage = "https://github.com/benediktschmitt/py-filelock"; - description = "Platform independent file lock for Python"; - license = lib.licenses.unlicense; - maintainers = with lib.maintainers; [ henkkalkwater ]; - }; -} diff --git a/pkgs/development/python2-modules/hypothesis/default.nix b/pkgs/development/python2-modules/hypothesis/default.nix deleted file mode 100644 index d2b8c9066f89..000000000000 --- a/pkgs/development/python2-modules/hypothesis/default.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchFromGitHub, - attrs, - coverage, - pexpect, - doCheck ? true, - pytest, - pytest-xdist, - flaky, - mock, - sortedcontainers, -}: -buildPythonPackage rec { - # https://hypothesis.readthedocs.org/en/latest/packaging.html - - # Hypothesis has optional dependencies on the following libraries - # pytz fake_factory django numpy pytest - # If you need these, you can just add them to your environment. - - version = "4.57.1"; - format = "setuptools"; - pname = "hypothesis"; - - # Use github tarballs that includes tests - src = fetchFromGitHub { - owner = "HypothesisWorks"; - repo = "hypothesis-python"; - rev = "hypothesis-python-${version}"; - sha256 = "1qcpcrk6892hzyjsdr581pw6i4fj9035nv89mcjrcrzcmycdlfds"; - }; - - postUnpack = "sourceRoot=$sourceRoot/hypothesis-python"; - - propagatedBuildInputs = [ - attrs - coverage - sortedcontainers - ]; - - nativeCheckInputs = [ - pytest - pytest-xdist - flaky - mock - pexpect - ]; - inherit doCheck; - - checkPhase = '' - rm tox.ini # This file changes how py.test runs and breaks it - py.test tests/cover - ''; - - meta = { - description = "Python library for property based testing"; - homepage = "https://github.com/HypothesisWorks/hypothesis"; - license = lib.licenses.mpl20; - }; -} diff --git a/pkgs/development/python2-modules/importlib-metadata/default.nix b/pkgs/development/python2-modules/importlib-metadata/default.nix deleted file mode 100644 index 7aaa45854161..000000000000 --- a/pkgs/development/python2-modules/importlib-metadata/default.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchPypi, - setuptools-scm, - zipp, - pathlib2, - contextlib2, - configparser, - isPy3k, -}: - -buildPythonPackage rec { - pname = "importlib-metadata"; - version = "2.1.1"; - format = "setuptools"; - - src = fetchPypi { - pname = "importlib_metadata"; - inherit version; - sha256 = "1pdmsmwagimn0lsl4x7sg3skcr2fvzqpv2pjd1rh7yrm5gzrxpmq"; - }; - - nativeBuildInputs = [ setuptools-scm ]; - - propagatedBuildInputs = [ - zipp - ] - ++ lib.optionals (!isPy3k) [ - pathlib2 - contextlib2 - configparser - ]; - - # Cyclic dependencies - doCheck = false; - - pythonImportsCheck = [ "importlib_metadata" ]; - - meta = { - description = "Read metadata from Python packages"; - homepage = "https://importlib-metadata.readthedocs.io/"; - license = lib.licenses.asl20; - }; -} diff --git a/pkgs/development/python2-modules/jinja2/default.nix b/pkgs/development/python2-modules/jinja2/default.nix deleted file mode 100644 index d66b6544e14e..000000000000 --- a/pkgs/development/python2-modules/jinja2/default.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ - lib, - stdenv, - buildPythonPackage, - isPy3k, - fetchPypi, - pytest, - markupsafe, - setuptools, -}: - -buildPythonPackage rec { - pname = "Jinja2"; - version = "2.11.3"; - format = "setuptools"; - - src = fetchPypi { - inherit pname version; - sha256 = "a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6"; - }; - - nativeCheckInputs = [ pytest ]; - propagatedBuildInputs = [ - markupsafe - setuptools - ]; - - # Multiple tests run out of stack space on 32bit systems with python2. - # See https://github.com/pallets/jinja/issues/1158 - # warnings are no longer being filtered correctly for python2 - doCheck = !stdenv.hostPlatform.is32bit && isPy3k; - - checkPhase = '' - pytest -v tests -W ignore::DeprecationWarning - ''; - - meta = { - homepage = "http://jinja.pocoo.org/"; - description = "Stand-alone template engine"; - license = lib.licenses.bsd3; - longDescription = '' - Jinja2 is a template engine written in pure Python. It provides a - Django inspired non-XML syntax but supports inline expressions and - an optional sandboxed environment. - ''; - maintainers = with lib.maintainers; [ pierron ]; - }; -} diff --git a/pkgs/development/python2-modules/markupsafe/default.nix b/pkgs/development/python2-modules/markupsafe/default.nix deleted file mode 100644 index ec6aa8cb600c..000000000000 --- a/pkgs/development/python2-modules/markupsafe/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchPypi, -}: - -buildPythonPackage rec { - pname = "MarkupSafe"; - version = "1.1.1"; - format = "setuptools"; - - src = fetchPypi { - inherit pname version; - sha256 = "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"; - }; - - meta = { - description = "Implements a XML/HTML/XHTML Markup safe string"; - homepage = "http://dev.pocoo.org"; - license = lib.licenses.bsd3; - maintainers = [ ]; - }; - -} diff --git a/pkgs/development/python2-modules/mock/default.nix b/pkgs/development/python2-modules/mock/default.nix deleted file mode 100644 index 3e100689eb54..000000000000 --- a/pkgs/development/python2-modules/mock/default.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchPypi, - isPy27, - funcsigs, - six, - pbr, - unittestCheckHook, - pytest, -}: - -buildPythonPackage rec { - pname = "mock"; - version = "3.0.5"; - format = "setuptools"; - - src = fetchPypi { - inherit pname version; - sha256 = "83657d894c90d5681d62155c82bda9c1187827525880eda8ff5df4ec813437c3"; - }; - - propagatedBuildInputs = [ - six - pbr - ] - ++ lib.optionals isPy27 [ funcsigs ]; - - # On PyPy for Python 2.7 in particular, Mock's tests have a known failure. - # Mock upstream has a decoration to disable the failing test and make - # everything pass, but it is not yet released. The commit: - # https://github.com/testing-cabal/mock/commit/73bfd51b7185#diff-354f30a63fb0907d4ad57269548329e3L12 - #doCheck = !(python.isPyPy && python.isPy27); - doCheck = false; # Infinite recursion pytest - - nativeCheckInputs = [ - unittestCheckHook - pytest - ]; - - meta = { - description = "Mock objects for Python"; - homepage = "http://python-mock.sourceforge.net/"; - license = lib.licenses.bsd2; - }; - -} diff --git a/pkgs/development/python2-modules/more-itertools/default.nix b/pkgs/development/python2-modules/more-itertools/default.nix deleted file mode 100644 index 783f57e1cfa9..000000000000 --- a/pkgs/development/python2-modules/more-itertools/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchPypi, - unittestCheckHook, - six, - stdenv, -}: - -buildPythonPackage rec { - pname = "more-itertools"; - version = "5.0.0"; - format = "setuptools"; - - src = fetchPypi { - inherit pname version; - sha256 = "38a936c0a6d98a38bcc2d03fdaaedaba9f412879461dd2ceff8d37564d6522e4"; - }; - - nativeCheckInputs = [ unittestCheckHook ]; - propagatedBuildInputs = [ six ]; - - # iterable = range(10 ** 10) # Is efficiently reversible - # OverflowError: Python int too large to convert to C long - doCheck = !stdenv.hostPlatform.is32bit; - - meta = { - homepage = "https://more-itertools.readthedocs.org"; - description = "Expansion of the itertools module"; - license = lib.licenses.mit; - }; -} diff --git a/pkgs/development/python2-modules/packaging/default.nix b/pkgs/development/python2-modules/packaging/default.nix deleted file mode 100644 index f5a0f459bd4e..000000000000 --- a/pkgs/development/python2-modules/packaging/default.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchPypi, - pyparsing, - six, - pytestCheckHook, - pretend, -}: - -# We keep 20.4 because it uses setuptools instead of flit-core -# which requires Python 3 to build a universal wheel. - -buildPythonPackage rec { - pname = "packaging"; - version = "20.4"; - format = "setuptools"; - - src = fetchPypi { - inherit pname version; - sha256 = "4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8"; - }; - - propagatedBuildInputs = [ - pyparsing - six - ]; - - nativeCheckInputs = [ - pytestCheckHook - pretend - ]; - - # Prevent circular dependency - doCheck = false; - - meta = { - description = "Core utilities for Python packages"; - homepage = "https://github.com/pypa/packaging"; - license = [ - lib.licenses.bsd2 - lib.licenses.asl20 - ]; - maintainers = with lib.maintainers; [ bennofs ]; - }; -} diff --git a/pkgs/development/python2-modules/pip/default.nix b/pkgs/development/python2-modules/pip/default.nix index 229f34fa1a7a..e0b6b001cb3e 100644 --- a/pkgs/development/python2-modules/pip/default.nix +++ b/pkgs/development/python2-modules/pip/default.nix @@ -3,11 +3,9 @@ buildPythonPackage, bootstrapped-pip, fetchFromGitHub, - mock, scripttest, virtualenv, pretend, - pytest, }: buildPythonPackage rec { @@ -30,12 +28,11 @@ buildPythonPackage rec { pipInstallFlags = [ "--ignore-installed" ]; nativeCheckInputs = [ - mock scripttest virtualenv pretend - pytest ]; + # Pip wants pytest, but tests are not distributed doCheck = false; diff --git a/pkgs/development/python2-modules/pluggy/default.nix b/pkgs/development/python2-modules/pluggy/default.nix deleted file mode 100644 index 968068182188..000000000000 --- a/pkgs/development/python2-modules/pluggy/default.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ - buildPythonPackage, - lib, - fetchPypi, - setuptools-scm, - importlib-metadata, -}: - -buildPythonPackage rec { - pname = "pluggy"; - version = "0.13.1"; - format = "setuptools"; - - src = fetchPypi { - inherit pname version; - sha256 = "15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"; - }; - - checkPhase = '' - py.test - ''; - - # To prevent infinite recursion with pytest - doCheck = false; - - nativeBuildInputs = [ setuptools-scm ]; - - propagatedBuildInputs = [ importlib-metadata ]; - - meta = { - description = "Plugin and hook calling mechanisms for Python"; - homepage = "https://github.com/pytest-dev/pluggy"; - license = lib.licenses.mit; - maintainers = [ ]; - }; -} diff --git a/pkgs/development/python2-modules/pycairo/default.nix b/pkgs/development/python2-modules/pycairo/default.nix deleted file mode 100644 index ed4f1f2e6e21..000000000000 --- a/pkgs/development/python2-modules/pycairo/default.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ - lib, - fetchFromGitHub, - fetchpatch, - meson, - ninja, - buildPythonPackage, - pytest, - pkg-config, - cairo, - python, -}: - -buildPythonPackage rec { - pname = "pycairo"; - version = "1.18.2"; - - format = "other"; - - src = fetchFromGitHub { - owner = "pygobject"; - repo = "pycairo"; - rev = "v${version}"; - sha256 = "142145a2whvlk92jijrbf3i2bqrzmspwpysj0bfypw0krzi0aa6j"; - }; - - patches = [ - (fetchpatch { - url = "https://github.com/pygobject/pycairo/commit/678edd94d8a6dfb5d51f9c3549e6ee8c90a73744.patch"; - sha256 = "sha256-HmP69tUGYxZvJ/M9FJHwHTCjb9Kf4aWRyMT4wSymrT0="; - }) - ]; - - nativeBuildInputs = [ - meson - ninja - pkg-config - ]; - - buildInputs = [ - cairo - ]; - - # HACK: Don't use the pytestCheckHook because PYTHONPATH - # will be added by the Python setuptook breaking meson. - checkPhase = '' - ${pytest}/bin/pytest - ''; - - mesonFlags = [ - # This is only used for figuring out what version of Python is in - # use, and related stuff like figuring out what the install prefix - # should be, but it does need to be able to execute Python code. - "-Dpython=${python.pythonOnBuildForHost.interpreter}" - ]; - - meta = { - description = "Python 2 bindings for cairo"; - homepage = "https://pycairo.readthedocs.io/"; - license = with lib.licenses; [ - lgpl21Only - mpl11 - ]; - platforms = lib.platforms.linux ++ lib.platforms.darwin; - }; -} diff --git a/pkgs/development/python2-modules/pygobject/default.nix b/pkgs/development/python2-modules/pygobject/default.nix deleted file mode 100644 index 88a4375b0029..000000000000 --- a/pkgs/development/python2-modules/pygobject/default.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ - lib, - stdenv, - fetchurl, - fetchpatch, - python, - buildPythonPackage, - pkg-config, - glib, - isPy3k, - pythonAtLeast, -}: - -buildPythonPackage rec { - pname = "pygobject"; - version = "2.28.7"; - format = "other"; - disabled = pythonAtLeast "3.9"; - - src = fetchurl { - url = "mirror://gnome/sources/pygobject/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "0nkam61rsn7y3wik3vw46wk5q2cjfh2iph57hl9m39rc8jijb7dv"; - }; - - outputs = [ - "out" - "devdoc" - ]; - - patches = lib.optionals stdenv.hostPlatform.isDarwin [ - ./pygobject-2.0-fix-darwin.patch - (fetchpatch { - url = "https://github.com/macports/macports-ports/raw/f2975d5bbbc2459c661905c5a850cc661fa32f55/python/py-gobject/files/py-gobject-dynamic_lookup-11.patch"; - sha256 = "sha256-mtlyu+La3+iC5iQAmVJzDA5E35XGaRQy/EKXzvrWRCg="; - extraPrefix = ""; - }) - ]; - - configureFlags = [ "--disable-introspection" ]; - - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ glib ]; - - # in a "normal" setup, pygobject and pygtk are installed into the - # same site-packages: we need a pth file for both. pygtk.py would be - # used to select a specific version, in our setup it should have no - # effect, but we leave it in case somebody expects and calls it. - postInstall = lib.optionalString (!isPy3k) '' - mv $out/${python.sitePackages}/{pygtk.pth,${pname}-${version}.pth} - - # Prevent wrapping of codegen files as these are meant to be - # executed by the python program - chmod a-x $out/share/pygobject/*/codegen/*.py - ''; - - meta = { - homepage = "https://pygobject.readthedocs.io/"; - description = "Python bindings for GLib"; - license = lib.licenses.gpl2; - maintainers = [ ]; - }; -} diff --git a/pkgs/development/python2-modules/pygobject/pygobject-2.0-fix-darwin.patch b/pkgs/development/python2-modules/pygobject/pygobject-2.0-fix-darwin.patch deleted file mode 100644 index 7fef05262f4d..000000000000 --- a/pkgs/development/python2-modules/pygobject/pygobject-2.0-fix-darwin.patch +++ /dev/null @@ -1,88 +0,0 @@ ---- a/gio/unix-types.defs -+++ b/gio/unix-types.defs -@@ -7,18 +7,6 @@ - (gtype-id "G_TYPE_UNIX_CONNECTION") - ) - --(define-object DesktopAppInfo -- (docstring -- "DesktopAppInfo(desktop_id) -> gio.unix.DesktopAppInfo\n\n" -- "gio.Unix.DesktopAppInfo is an implementation of gio.AppInfo\n" -- "based on desktop files." -- ) -- (in-module "giounix") -- (parent "GObject") -- (c-name "GDesktopAppInfo") -- (gtype-id "G_TYPE_DESKTOP_APP_INFO") --) -- - (define-object FDMessage - (in-module "giounix") - (parent "GSocketControlMessage") ---- a/gio/unix.defs -+++ b/gio/unix.defs -@@ -32,54 +32,6 @@ - - - --;; From gdesktopappinfo.h -- --(define-function desktop_app_info_get_type -- (c-name "g_desktop_app_info_get_type") -- (return-type "GType") --) -- --(define-function desktop_app_info_new_from_filename -- (c-name "g_desktop_app_info_new_from_filename") -- (return-type "GDesktopAppInfo*") -- (parameters -- '("const-char*" "filename") -- ) --) -- --(define-function g_desktop_app_info_new_from_keyfile -- (c-name "g_desktop_app_info_new_from_keyfile") -- (return-type "GDesktopAppInfo*") -- (parameters -- '("GKeyFile*" "key_file") -- ) --) -- --(define-function desktop_app_info_new -- (c-name "g_desktop_app_info_new") -- (is-constructor-of "GDesktopAppInfo") -- (return-type "GDesktopAppInfo*") -- (parameters -- '("const-char*" "desktop_id") -- ) --) -- --(define-method get_is_hidden -- (of-object "GDesktopAppInfo") -- (c-name "g_desktop_app_info_get_is_hidden") -- (return-type "gboolean") --) -- --(define-function desktop_app_info_set_desktop_env -- (c-name "g_desktop_app_info_set_desktop_env") -- (return-type "none") -- (parameters -- '("const-char*" "desktop_env") -- ) --) -- -- -- - ;; From gunixfdmessage.h - - (define-function g_unix_fd_message_get_type ---- a/gio/unix.override -+++ b/gio/unix.override -@@ -24,7 +24,6 @@ - #define NO_IMPORT_PYGOBJECT - #include - #include --#include - #include - #include - #include diff --git a/pkgs/development/python2-modules/pygtk/default.nix b/pkgs/development/python2-modules/pygtk/default.nix deleted file mode 100644 index e5702f908169..000000000000 --- a/pkgs/development/python2-modules/pygtk/default.nix +++ /dev/null @@ -1,99 +0,0 @@ -{ - lib, - stdenv, - fetchurl, - fetchpatch, - python, - pkg-config, - gtk2, - pygobject2, - pycairo, - pango, - buildPythonPackage, - isPy3k, -}: - -buildPythonPackage rec { - pname = "pygtk"; - outputs = [ - "out" - "dev" - ]; - version = "2.24.0"; - format = "other"; - - disabled = isPy3k; - - src = fetchurl { - url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2"; - sha256 = "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"; - }; - - patches = [ - # https://bugzilla.gnome.org/show_bug.cgi?id=660216 - fixes some memory leaks - (fetchpatch { - url = "https://gitlab.gnome.org/Archive/pygtk/commit/eca72baa5616fbe4dbebea43c7e5940847dc5ab8.diff"; - sha256 = "031px4w5cshcx1sns430sdbr2i007b9zyb2carb3z65nzr77dpdd"; - }) - (fetchpatch { - url = "https://gitlab.gnome.org/Archive/pygtk/commit/4aaa48eb80c6802aec6d03e5695d2a0ff20e0fc2.patch"; - sha256 = "0z8cg7nr3qki8gg8alasdzzyxcihfjlxn518glq5ajglk3q5pzsn"; - }) - ]; - - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ - pango - ]; - - propagatedBuildInputs = [ - gtk2 - pygobject2 - pycairo - ]; - - configurePhase = "configurePhase"; - - buildPhase = "buildPhase"; - - env.NIX_CFLAGS_COMPILE = - lib.optionalString stdenv.hostPlatform.isDarwin "-ObjC" - + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) " -lpython2.7" - + " -fpermissive"; # downgrade code errors to warnings - - installPhase = "installPhase"; - - checkPhase = '' - sed -i -e "s/glade = importModule('gtk.glade', buildDir)//" \ - tests/common.py - sed -i -e "s/, glade$//" \ - -e "s/.*testGlade.*//" \ - -e "s/.*(glade.*//" \ - tests/test_api.py - '' - + '' - sed -i -e "s/sys.path.insert(0, os.path.join(buildDir, 'gtk'))//" \ - -e "s/sys.path.insert(0, buildDir)//" \ - tests/common.py - make check - ''; - # XXX: TypeError: Unsupported type: - # The check phase was not executed in the previous - # non-buildPythonPackage setup - not sure why not. - doCheck = false; - - postInstall = '' - rm $out/bin/pygtk-codegen-2.0 - ln -s ${pygobject2}/bin/pygobject-codegen-2.0 $out/bin/pygtk-codegen-2.0 - ln -s ${pygobject2}/${python.sitePackages}/pygobject-${pygobject2.version}.pth \ - $out/${python.sitePackages}/${pname}-${version}.pth - ''; - - meta = { - description = "GTK 2 Python bindings"; - homepage = "https://gitlab.gnome.org/Archive/pygtk"; - platforms = lib.platforms.all; - license = with lib.licenses; [ lgpl21Plus ]; - maintainers = with lib.maintainers; [ bryango ]; - }; -} diff --git a/pkgs/development/python2-modules/pyparsing/default.nix b/pkgs/development/python2-modules/pyparsing/default.nix deleted file mode 100644 index 36de6922e72d..000000000000 --- a/pkgs/development/python2-modules/pyparsing/default.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ - buildPythonPackage, - fetchFromGitHub, - lib, - - # since this is a dependency of pytest, we need to avoid - # circular dependencies - jinja2, - railroad-diagrams, -}: - -let - pyparsing = buildPythonPackage rec { - pname = "pyparsing"; - version = "2.4.7"; - format = "setuptools"; - - src = fetchFromGitHub { - owner = "pyparsing"; - repo = pname; - rev = "pyparsing_${version}"; - sha256 = "14pfy80q2flgzjcx8jkracvnxxnr59kjzp3kdm5nh232gk1v6g6h"; - }; - - # circular dependencies if enabled by default - doCheck = false; - nativeCheckInputs = [ - jinja2 - railroad-diagrams - ]; - - checkPhase = '' - python -m unittest - ''; - - passthru.tests = { - check = pyparsing.overridePythonAttrs (_: { - doCheck = true; - }); - }; - - meta = { - homepage = "https://github.com/pyparsing/pyparsing"; - description = "Alternative approach to creating and executing simple grammars, vs. the traditional lex/yacc approach, or the use of regular expressions"; - license = lib.licenses.mit; - }; - }; -in -pyparsing diff --git a/pkgs/development/python2-modules/pytest-xdist/default.nix b/pkgs/development/python2-modules/pytest-xdist/default.nix deleted file mode 100644 index 96db76de1488..000000000000 --- a/pkgs/development/python2-modules/pytest-xdist/default.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ - lib, - fetchPypi, - buildPythonPackage, - execnet, - pytest, - setuptools-scm, - pytest-forked, - filelock, - psutil, - six, - isPy3k, -}: - -buildPythonPackage rec { - pname = "pytest-xdist"; - version = "1.34.0"; - format = "setuptools"; - - src = fetchPypi { - inherit pname version; - sha256 = "1vh4ps32lp5ignch5adbl3pgchvigdfmrl6qpmhxih54wa1qw3il"; - }; - - nativeBuildInputs = [ - setuptools-scm - pytest - ]; - nativeCheckInputs = [ - pytest - filelock - ]; - propagatedBuildInputs = [ - execnet - pytest-forked - psutil - six - ]; - - # Encountered a memory leak - # https://github.com/pytest-dev/pytest-xdist/issues/462 - doCheck = !isPy3k; - - checkPhase = '' - # Excluded tests access file system - py.test testing -k "not test_distribution_rsyncdirs_example \ - and not test_rsync_popen_with_path \ - and not test_popen_rsync_subdir \ - and not test_init_rsync_roots \ - and not test_rsyncignore" - ''; - - meta = { - description = "py.test xdist plugin for distributed testing and loop-on-failing modes"; - homepage = "https://github.com/pytest-dev/pytest-xdist"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ dotlambda ]; - }; -} diff --git a/pkgs/development/python2-modules/pytest/default.nix b/pkgs/development/python2-modules/pytest/default.nix deleted file mode 100644 index 3adb0a7d4aad..000000000000 --- a/pkgs/development/python2-modules/pytest/default.nix +++ /dev/null @@ -1,101 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchPypi, - attrs, - hypothesis, - py, - setuptools-scm, - setuptools, - six, - pluggy, - funcsigs, - isPy3k, - more-itertools, - atomicwrites, - mock, - writeText, - wcwidth, - packaging, - isPyPy, -}: -buildPythonPackage rec { - version = "4.6.11"; - format = "setuptools"; - pname = "pytest"; - - src = fetchPypi { - inherit pname version; - sha256 = "50fa82392f2120cc3ec2ca0a75ee615be4c479e66669789771f1758332be4353"; - }; - - postPatch = '' - substituteInPlace setup.py \ - --replace "pluggy>=0.12,<1.0" "pluggy>=0.12,<2.0" - ''; - - nativeCheckInputs = [ - hypothesis - mock - ]; - buildInputs = [ setuptools-scm ]; - propagatedBuildInputs = [ - attrs - py - setuptools - six - pluggy - more-itertools - atomicwrites - wcwidth - packaging - ] - ++ lib.optionals (!isPy3k) [ funcsigs ]; - - doCheck = !isPyPy; # https://github.com/pytest-dev/pytest/issues/3460 - checkPhase = '' - runHook preCheck - - # don't test bash builtins - rm testing/test_argcomplete.py - - # determinism - this test writes non deterministic bytecode - rm -rf testing/test_assertrewrite.py - - PYTHONDONTWRITEBYTECODE=1 $out/bin/py.test -x testing/ -k "not test_collect_pyargs_with_testpaths" - runHook postCheck - ''; - - # Remove .pytest_cache when using py.test in a Nix build - setupHook = writeText "pytest-hook" '' - pytestcachePhase() { - find $out -name .pytest_cache -type d -exec rm -rf {} + - } - - appendToVar preDistPhases pytestcachePhase - - # pytest generates it's own bytecode files to improve assertion messages. - # These files similar to cpython's bytecode files but are never laoded - # by python interpreter directly. We remove them for a few reasons: - # - files are non-deterministic: https://github.com/NixOS/nixpkgs/issues/139292 - # (file headers are generatedt by pytest directly and contain timestamps) - # - files are not needed after tests are finished - pytestRemoveBytecodePhase () { - # suffix is defined at: - # https://github.com/pytest-dev/pytest/blob/4.6.11/src/_pytest/assertion/rewrite.py#L32-L47 - find $out -name "*-PYTEST.py[co]" -delete - } - appendToVar preDistPhases pytestRemoveBytecodePhase - ''; - - meta = { - homepage = "https://docs.pytest.org"; - description = "Framework for writing tests"; - maintainers = with lib.maintainers; [ - lovek323 - madjar - ]; - license = lib.licenses.mit; - platforms = lib.platforms.unix; - }; -} diff --git a/pkgs/development/python2-modules/wcwidth/default.nix b/pkgs/development/python2-modules/wcwidth/default.nix deleted file mode 100644 index f16622f7a7b0..000000000000 --- a/pkgs/development/python2-modules/wcwidth/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ - backports-functools-lru-cache, - wcwidth, - lib, -}: - -wcwidth.overridePythonAttrs (oldAttrs: { - propagatedBuildInputs = oldAttrs.propagatedBuildInputs or [ ] ++ [ - backports-functools-lru-cache - ]; - - /** - As of version 0.2.13 upstream still supports python2. In the future, this - package should be dropped or pinned to the last working version after the - final release for python2. See: - https://github.com/jquast/wcwidth/pull/117#issuecomment-1946609638 - */ - disabled = false; - - meta = oldAttrs.meta // { - /** - maintainers overridden here for python2; this makes sure that python3 - maintainers are not blamed for the breakage here. - */ - maintainers = with lib.maintainers; [ bryango ]; - }; -}) diff --git a/pkgs/development/python2-modules/zipp/default.nix b/pkgs/development/python2-modules/zipp/default.nix deleted file mode 100644 index a08e88cc6d7d..000000000000 --- a/pkgs/development/python2-modules/zipp/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchPypi, - setuptools-scm, - pytest, - pytest-flake8, - more-itertools, -}: - -buildPythonPackage rec { - pname = "zipp"; - version = "1.0.0"; - format = "setuptools"; - - src = fetchPypi { - inherit pname version; - sha256 = "0v3qayhqv7vyzydpydwcp51bqciw8p2ajddw68x5k8zppc0vx3yk"; - }; - - nativeBuildInputs = [ setuptools-scm ]; - - propagatedBuildInputs = [ more-itertools ]; - - nativeCheckInputs = [ - pytest - pytest-flake8 - ]; - - checkPhase = '' - pytest - ''; - - # Prevent infinite recursion with pytest - doCheck = false; - - meta = { - description = "Pathlib-compatible object wrapper for zip files"; - homepage = "https://github.com/jaraco/zipp"; - license = lib.licenses.mit; - }; -} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index f633a7ecc96b..bbecf82f65b8 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -74,6 +74,7 @@ mapAliases { atsim_potentials = throw "'atsim_potentials' has been renamed to/replaced by 'atsim-potentials'"; # Converted to throw 2025-10-29 autotrash = throw "'autotrash' has been renamed to/replaced by 'super.pkgs.autotrash'"; # Converted to throw 2025-10-29 Babel = throw "'Babel' has been renamed to/replaced by 'babel'"; # Converted to throw 2025-10-29 + backports-functools-lru-cache = throw "'backports-functools-lru-cache' has been removed from nixpkgs as it was not longer used in python2"; # Added 2026-01-14 backports_shutil_get_terminal_size = throw "'backports_shutil_get_terminal_size' has been renamed to/replaced by 'backports-shutil-get-terminal-size'"; # Converted to throw 2025-10-29 basewood-av = throw "'basewood-av' has been removed due to being archived upstream and unused"; # added 2025-11-26 bash_kernel = throw "'bash_kernel' has been renamed to/replaced by 'bash-kernel'"; # Converted to throw 2025-10-29 @@ -340,6 +341,7 @@ mapAliases { pygame_sdl2 = throw "'pygame_sdl2' has been renamed to/replaced by 'pygame-sdl2'"; # Converted to throw 2025-10-29 PyGithub = throw "'PyGithub' has been renamed to/replaced by 'pygithub'"; # Converted to throw 2025-10-29 pygls_2 = pygls; # added 2026-01-05 + pygtk = throw "pygtk has been removed because it was not supported by python3"; # Added 2026-01-14 pyheif = throw "pyheif has been removed due to lack of upstream maintenance and breakage. Use `pillow-heif` instead."; # added 2025-09-17 pyhiveapi = throw "'pyhiveapi' has been renamed to/replaced by 'pyhive-integration'"; # Converted to throw 2025-10-29 pyialarmxr = throw "'pyialarmxr' has been renamed to/replaced by 'pyialarmxr-homeassistant'"; # Converted to throw 2025-10-29 @@ -352,6 +354,7 @@ mapAliases { pymicro-vad = throw "'pymicro-vad' was removed because Home Assistant switched to 'pysilero-vad'"; # added 2026-01-08 PyMVGLive = throw "'PyMVGLive' has been renamed to/replaced by 'pymvglive'"; # Converted to throw 2025-10-29 pymyq = throw "'pymyq' has been renamed to/replaced by 'python-myq'"; # Converted to throw 2025-10-29 + pyobject = throw "'pyobject' has been removed because it was only supporting python 2"; # Added 2026-01-24 pyownet = throw "pyownet was removed because Home Assistant switched to aio-ownet"; # added 2025-10-31 pypcap = throw "pypcap has been removed because it is broken and unmaintained upstream."; # added 2025-06-18 pyqldb = throw "pyqldb has been removed, because the underlying service is reaching end of support"; # added 2025-07-30 diff --git a/pkgs/top-level/python2-packages.nix b/pkgs/top-level/python2-packages.nix index ebfdbb802acb..ab674985fe11 100644 --- a/pkgs/top-level/python2-packages.nix +++ b/pkgs/top-level/python2-packages.nix @@ -7,66 +7,49 @@ self: super: with self; with super; { - attrs = callPackage ../development/python2-modules/attrs { }; - - backports-functools-lru-cache = - callPackage ../development/python2-modules/backports-functools-lru-cache - { }; + attrs = disabled super.attrs; bootstrapped-pip = toPythonModule (callPackage ../development/python2-modules/bootstrapped-pip { }); - cffi = callPackage ../development/python2-modules/cffi { inherit cffi; }; + cffi = disabed super.cffi; - configparser = callPackage ../development/python2-modules/configparser { }; + configparser = disabled super.configparser; - contextlib2 = callPackage ../development/python2-modules/contextlib2 { }; + contextlib2 = disabled super.contextlib2; - coverage = callPackage ../development/python2-modules/coverage { }; + coverage = disabled super.coverage; - filelock = callPackage ../development/python2-modules/filelock { }; + filelock = disabled super.filelock; - hypothesis = callPackage ../development/python2-modules/hypothesis { }; + hypothesis = disabled super.hypothesis; - importlib-metadata = callPackage ../development/python2-modules/importlib-metadata { }; + importlib-metadata = disabled super.importlib-metadata; - jinja2 = callPackage ../development/python2-modules/jinja2 { }; + jinja2 = disabled super.jinja2; - markupsafe = callPackage ../development/python2-modules/markupsafe { }; + markupsafe = disabled super.markupsafe; - mock = callPackage ../development/python2-modules/mock { }; + mock = disabled super.mock; - more-itertools = callPackage ../development/python2-modules/more-itertools { }; + more-itertools = disabled super.more-itertools; - # ninja python stub was created to help simplify python builds using PyPA's - # build tool in Python 3, but it does not yet support Python 2 - ninja = pkgs.buildPackages.ninja; + ninja = disabled super.ninja; - packaging = callPackage ../development/python2-modules/packaging { }; + packaging = disabled super.packaging; pip = callPackage ../development/python2-modules/pip { }; - pluggy = callPackage ../development/python2-modules/pluggy { }; + pluggy = disabled super.pluggy; - pycairo = callPackage ../development/python2-modules/pycairo { - inherit (pkgs.buildPackages) meson; - }; + pycairo = disabled super.pycairo; - pygobject2 = callPackage ../development/python2-modules/pygobject { }; + pyparsing = disabled super.pyparsing; - pygtk = callPackage ../development/python2-modules/pygtk { }; + pytest = disabled super.pytest; - pyparsing = callPackage ../development/python2-modules/pyparsing { }; + pytest_4 = disabled super.pytest; - pytest = pytest_4; - - pytest_4 = callPackage ../development/python2-modules/pytest { - # hypothesis tests require pytest that causes dependency cycle - hypothesis = self.hypothesis.override { - doCheck = false; - }; - }; - - pytest-xdist = callPackage ../development/python2-modules/pytest-xdist { }; + pytest-xdist = disabled super.pytest-xdist; recoll = disabled super.recoll; @@ -76,18 +59,13 @@ with super; setuptools = callPackage ../development/python2-modules/setuptools { }; - six = super.six.overridePythonAttrs (_: { - doCheck = false; # circular dependency with pytest - }); + six = disabled super.six; - wcwidth = callPackage ../development/python2-modules/wcwidth { - inherit wcwidth; - }; + wcwidth = disabled super.wcwitch; wheel = callPackage ../development/python2-modules/wheel { }; zeek = disabled super.zeek; - zipp = callPackage ../development/python2-modules/zipp { }; - + zipp = disabled super.zipp; }