diff --git a/pkgs/development/python-modules/pygobject/default.nix b/pkgs/development/python-modules/pygobject/default.nix deleted file mode 100644 index 14acb15e03b5..000000000000 --- a/pkgs/development/python-modules/pygobject/default.nix +++ /dev/null @@ -1,47 +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/2.28/${pname}-${version}.tar.xz"; - sha256 = "0nkam61rsn7y3wik3vw46wk5q2cjfh2iph57hl9m39rc8jijb7dv"; - }; - - outputs = [ "out" "devdoc" ]; - - patches = lib.optionals stdenv.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/lib/${python.libPrefix}/site-packages/{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 = with lib; { - homepage = "https://pygobject.readthedocs.io/"; - description = "Python bindings for GLib"; - platforms = platforms.unix; - }; -} diff --git a/pkgs/development/python2-modules/gtkme/default.nix b/pkgs/development/python2-modules/gtkme/default.nix deleted file mode 100644 index bc23854d95c8..000000000000 --- a/pkgs/development/python2-modules/gtkme/default.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ lib -, buildPythonPackage -, fetchPypi -, pkg-config -, gobject-introspection -, pygobject3 -, gtk3 -, glib -}: - -buildPythonPackage rec { - pname = "gtkme"; - version = "1.5.3"; - - src = fetchPypi { - inherit pname version; - sha256 = "sha256-NIUgnbfcHjbPfsH3CF2Bywo8owrdsi1wqDoMxOa+2U4="; - }; - - nativeBuildInputs = [ pkg-config gobject-introspection gtk3 ]; - buildInputs = [ pygobject3 glib ]; - propagatedBuildInputs = [ gtk3 ]; - - pythonImportsCheck = [ - "gtkme" - ]; - - meta = with lib; { - description = "Manages an Application with Gtk windows, forms, lists and other complex items easily"; - homepage = "https://gitlab.com/doctormo/gtkme"; - license = licenses.gpl3Plus; - maintainers = with maintainers; [ - revol-xut - ]; - }; -} diff --git a/pkgs/development/python2-modules/idna/default.nix b/pkgs/development/python2-modules/idna/default.nix deleted file mode 100644 index 9a1c1dc271f1..000000000000 --- a/pkgs/development/python2-modules/idna/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ lib -, buildPythonPackage -, fetchPypi -, pytestCheckHook -}: - -buildPythonPackage rec { - pname = "idna"; - version = "2.10"; - - src = fetchPypi { - inherit pname version; - sha256 = "b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6"; - }; - - checkInputs = [ pytestCheckHook ]; - - meta = { - homepage = "https://github.com/kjd/idna/"; - description = "Internationalized Domain Names in Applications (IDNA)"; - license = lib.licenses.bsd3; - }; -} diff --git a/pkgs/development/python2-modules/pygobject/default.nix b/pkgs/development/python2-modules/pygobject/default.nix index ce9410eaf8b5..2a09002976b2 100644 --- a/pkgs/development/python2-modules/pygobject/default.nix +++ b/pkgs/development/python2-modules/pygobject/default.nix @@ -1,33 +1,48 @@ -{ lib, stdenv, fetchurl, buildPythonPackage, pkg-config, glib, gobject-introspection, -pycairo, cairo, which, ncurses, meson, ninja, isPy3k, gnome }: +{ lib, stdenv, fetchurl, fetchpatch, python, buildPythonPackage, pkg-config, glib, isPy3k, pythonAtLeast }: buildPythonPackage rec { pname = "pygobject"; - version = "3.36.1"; - + version = "2.28.7"; format = "other"; + disabled = pythonAtLeast "3.9"; src = fetchurl { - url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "0b9CgC0c7BE7Wtqg579/N0W0RSHcIWNYjSdtXNYdcY8="; + url = "mirror://gnome/sources/pygobject/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "0nkam61rsn7y3wik3vw46wk5q2cjfh2iph57hl9m39rc8jijb7dv"; }; - outputs = [ "out" "dev" ]; + outputs = [ "out" "devdoc" ]; - mesonFlags = [ - "-Dpython=python${if isPy3k then "3" else "2" }" + patches = lib.optionals stdenv.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 = ""; + }) ]; - nativeBuildInputs = [ pkg-config meson ninja gobject-introspection ]; - buildInputs = [ glib gobject-introspection ] - ++ lib.optionals stdenv.isDarwin [ which ncurses ]; - propagatedBuildInputs = [ pycairo cairo ]; + 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 = with lib; { homepage = "https://pygobject.readthedocs.io/"; - description = "Python bindings for Glib"; + description = "Python bindings for GLib"; license = licenses.gpl2; - maintainers = with maintainers; [ orivej ]; - platforms = platforms.unix; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/pygobject/pygobject-2.0-fix-darwin.patch b/pkgs/development/python2-modules/pygobject/pygobject-2.0-fix-darwin.patch similarity index 100% rename from pkgs/development/python-modules/pygobject/pygobject-2.0-fix-darwin.patch rename to pkgs/development/python2-modules/pygobject/pygobject-2.0-fix-darwin.patch diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 821073b9c781..30d2c3c5e0d7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7918,8 +7918,6 @@ self: super: with self; { pygmt = callPackage ../development/python-modules/pygmt { }; - pygobject2 = callPackage ../development/python-modules/pygobject { }; - pygobject3 = callPackage ../development/python-modules/pygobject/3.nix { # inherit (pkgs) meson won't work because it won't be spliced inherit (pkgs.buildPackages) meson; diff --git a/pkgs/top-level/python2-packages.nix b/pkgs/top-level/python2-packages.nix index 8e22a787dada..c5f47d24f7ad 100644 --- a/pkgs/top-level/python2-packages.nix +++ b/pkgs/top-level/python2-packages.nix @@ -21,12 +21,8 @@ with self; with super; { futures = callPackage ../development/python2-modules/futures { }; - gtkme = callPackage ../development/python2-modules/gtkme { }; - hypothesis = callPackage ../development/python2-modules/hypothesis { }; - idna = callPackage ../development/python2-modules/idna { }; - importlib-metadata = callPackage ../development/python2-modules/importlib-metadata { }; jinja2 = callPackage ../development/python2-modules/jinja2 { }; @@ -47,9 +43,7 @@ with self; with super; { inherit (pkgs.buildPackages) meson; }; - pygobject3 = callPackage ../development/python2-modules/pygobject { - inherit (pkgs) meson; - }; + pygobject2 = callPackage ../development/python2-modules/pygobject { }; pygtk = callPackage ../development/python2-modules/pygtk { };