Skip to content

Commit

Permalink
py-gobject3: fix 36; drop unused 37, 38
Browse files Browse the repository at this point in the history
  • Loading branch information
mascguy committed Mar 8, 2025
1 parent 8221fd6 commit 51b1145
Showing 1 changed file with 15 additions and 34 deletions.
49 changes: 15 additions & 34 deletions python/py-gobject3/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

PortSystem 1.0
PortGroup python 1.0
PortGroup meson 1.0

name py-gobject3
set my_name pygobject
Expand All @@ -12,20 +11,20 @@ revision 0
categories-append gnome
license LGPL-2.1+
maintainers {devans @dbevans} {mascguy @mascguy} openmaintainer
description Python bindings for GObject, version 3

description Python bindings for GObject, version 3
long_description PyGObject is a Python dynamic module that enables developers to use the \
power of GObject, which is part of the GNOME platform.

homepage https://pygobject.readthedocs.io/

use_xz yes

checksums rmd160 8a797437434ed98e0d957815ec77f85cffcb7ca9 \
sha256 8d836e75b5a881d457ee1622cae4a32bcdba28a0ba562193adb3bbb472472212 \
size 929848

python.versions 36 37 38 39 310 311 312 313
python.pep517 no
# Note: 3.6 needed for a few old Gnome ports, remove once those have been migrated to 3.9+
python.versions 36 39 310 311 312 313

if {${name} ne ${subport}} {
if {${python.version} < 38} {
Expand All @@ -35,14 +34,16 @@ if {${name} ne ${subport}} {
checksums rmd160 6c6eb71defdef6095371bcddc33faf4db4e856e9 \
sha256 3c6805d1321be90cc32e648215a562430e0d3d6edcda8f4c5e7a9daffcad5710 \
size 559432

python.pep517 no
}

set branch [join [lrange [split ${version} .] 0 1] .]
master_sites gnome:sources/${my_name}/${branch}/
distname ${my_name}-${version}

depends_build-append \
port:pkgconfig \
path:bin/pkg-config:pkgconfig \
port:py${python.version}-setuptools

depends_lib-append \
Expand All @@ -69,36 +70,16 @@ if {${name} ne ${subport}} {
}

if {${python.version} >= 38} {
set python_ver_dot [string index ${python.version} 0].[string range ${python.version} 1 end]

configure.python ${prefix}/bin/python${python_ver_dot}

meson.native.binaries-append \
python3=${configure.python}

python.pep517 yes
python.pep517_backend \
meson
set python_prefix ${frameworks_dir}/Python.framework/Versions/${python_ver_dot}

# Use meson build system directly
use_configure yes
configure.cmd ${prefix}/bin/meson
configure.pre_args setup
configure.args --prefix=${python_prefix} --buildtype=plain
configure.post_args build

# Make sure we're in the source directory for build
build.dir ${worksrcpath}
build.cmd ${prefix}/bin/meson
build.target compile
build.args -C build

# And for install
destroot.dir ${worksrcpath}
destroot.cmd ${prefix}/bin/meson
destroot.target install
destroot.args -C build
destroot.destdir DESTDIR=${destroot}

depends_build-append \
port:py${python.version}-packaging

configure.args-append \
-Dpython=${python.bin} \
-Dtests=false
}

livecheck.type none
Expand Down

0 comments on commit 51b1145

Please sign in to comment.