After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 641945 - Add global PLATFORM_VERSION var
Add global PLATFORM_VERSION var
Status: RESOLVED OBSOLETE
Product: pygobject
Classification: Bindings
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2011-02-09 17:46 UTC by Ignacio Casal Quinteiro (nacho)
Modified: 2011-08-13 10:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
platform version (2.24 KB, patch)
2011-02-09 17:46 UTC, Ignacio Casal Quinteiro (nacho)
none Details | Review
platform version v2 (4.80 KB, patch)
2011-02-09 19:38 UTC, Ignacio Casal Quinteiro (nacho)
needs-work Details | Review
platform version v3 (4.66 KB, patch)
2011-02-09 21:09 UTC, Ignacio Casal Quinteiro (nacho)
reviewed Details | Review
platform version v4 (3.14 KB, patch)
2011-08-06 13:24 UTC, Ignacio Casal Quinteiro (nacho)
none Details | Review

Description Ignacio Casal Quinteiro (nacho) 2011-02-09 17:46:06 UTC
Created attachment 180496 [details] [review]
platform version

Right now we have a PLATFORM_VERSION in each makefile, this patch adds one globally and use it.
Comment 1 Ignacio Casal Quinteiro (nacho) 2011-02-09 19:38:52 UTC
Created attachment 180501 [details] [review]
platform version v2

I also tried to make pyglib use this var but for some reason doesn't work, right now it is hardcoded to use 2.0
Comment 2 johnp 2011-02-09 20:21:17 UTC
Comment on attachment 180501 [details] [review]
platform version v2

>From af45909e5747d0bf45d49ce33898b5ae42be5e4d Mon Sep 17 00:00:00 2001
>From: Ignacio Casal Quinteiro <icq@gnome.org>
>Date: Wed, 9 Feb 2011 18:47:13 +0100
>Subject: [PATCH] Use global PLATFORM_VERSION variable.
>
>---
> Makefile.am         |    7 +------
> codegen/Makefile.am |    2 --
> configure.ac        |   10 +++++++---
> gi/Makefile.am      |    4 +---
> glib/Makefile.am    |   13 ++++++-------
> gobject/Makefile.am |    5 +----
> 6 files changed, 16 insertions(+), 25 deletions(-)
>
>diff --git a/Makefile.am b/Makefile.am
>index 9d1b69f..6b892a7 100644
>--- a/Makefile.am
>+++ b/Makefile.am
>@@ -1,6 +1,3 @@

these are actually needed

>-ACLOCAL_AMFLAGS = -I m4
>-AUTOMAKE_OPTIONS = 1.7
>-
> SUBDIRS = docs codegen glib gobject examples
> 
> if ENABLE_INTROSPECTION
>@@ -9,8 +6,6 @@ endif
> 
> SUBDIRS += tests
> 
>-PLATFORM_VERSION = 2.0
>-
> CLEANFILES =
> EXTRA_DIST = 				\
> 	MANIFEST.in 			\
>@@ -64,7 +59,7 @@ pkgconfigdir = $(libdir)/pkgconfig
> pkgconfig_DATA = pygobject-$(PLATFORM_VERSION).pc
> 
> # python modules
>-pkgpyexecdir = $(pyexecdir)/gtk-2.0
>+pkgpyexecdir = $(pyexecdir)/gtk-$(PLATFORM_VERSION)
> pkgpyexec_PYTHON = dsextras.py
> pkgpyexec_LTLIBRARIES =
> 
>diff --git a/codegen/Makefile.am b/codegen/Makefile.am
>index f9886eb..5faa5e9 100644
>--- a/codegen/Makefile.am
>+++ b/codegen/Makefile.am
>@@ -1,5 +1,3 @@
>-PLATFORM_VERSION = 2.0
>-
> bin_SCRIPTS = pygobject-codegen-$(PLATFORM_VERSION)
> 
> codegendir = $(pkgdatadir)/$(PLATFORM_VERSION)/codegen
>diff --git a/configure.ac b/configure.ac
>index 0254e4f..3f5cba0 100644
>--- a/configure.ac
>+++ b/configure.ac
>@@ -40,6 +40,10 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)])
> AM_INIT_AUTOMAKE(foreign)
> AM_MAINTAINER_MODE
> 
>+PLATFORM_VERSION=2.0
>+AC_SUBST([PLATFORM_VERSION])
>+AC_SUBST([PLATFORM_VERSION_U],[AS_TR_SH([$PLATFORM_VERSION])])
>+
> dnl put the ACLOCAL flags in the makefile
> ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
> 
>@@ -262,10 +266,10 @@ fi
> 
> AC_CONFIG_FILES(
>   Makefile
>-  pygobject-2.0.pc
>-  pygobject-2.0-uninstalled.pc
>+  pygobject-$PLATFORM_VERSION.pc
>+  pygobject-$PLATFORM_VERSION-uninstalled.pc
>   codegen/Makefile
>-  codegen/pygobject-codegen-2.0
>+  codegen/pygobject-codegen-$PLATFORM_VERSION
>   docs/Makefile
>   docs/reference/entities.docbook
>   docs/xsl/fixxref.py
>diff --git a/gi/Makefile.am b/gi/Makefile.am
>index a98993b..0ae4788 100644
>--- a/gi/Makefile.am
>+++ b/gi/Makefile.am
>@@ -1,5 +1,3 @@
>-PLATFORM_VERSION = 2.0
>-
> pkgincludedir = $(includedir)/pygtk-$(PLATFORM_VERSION)
> pkgpyexecdir = $(pyexecdir)
> 
>@@ -26,7 +24,7 @@ _gi_la_LDFLAGS = \
> _gi_la_LIBADD = \
> 	$(GI_LIBS) \
> 	$(PYTHON_LIBS) \
>-	$(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
>+	$(top_builddir)/glib/libpyglib-@PLATFORM_VERSION@-@PYTHON_BASENAME@.la
> _gi_la_SOURCES = \
> 	pygi-repository.c \
> 	pygi-repository.h \
>diff --git a/glib/Makefile.am b/glib/Makefile.am
>index 32d0ec9..4004a63 100644
>--- a/glib/Makefile.am
>+++ b/glib/Makefile.am
>@@ -1,10 +1,9 @@
>-AUTOMAKE_OPTIONS = 1.7
> INCLUDES = $(PYTHON_INCLUDES) $(GLIB_CFLAGS) -DPY_SSIZE_T_CLEAN
> 
>-pkgincludedir = $(includedir)/pygtk-2.0
>+pkgincludedir = $(includedir)/pygtk-$(PLATFORM_VERSION)
> pkginclude_HEADERS = pyglib.h
> 
>-lib_LTLIBRARIES = libpyglib-2.0-@PYTHON_BASENAME@.la
>+lib_LTLIBRARIES = libpyglib-@PLATFORM_VERSION@-@PYTHON_BASENAME@.la
> 
> pkgpyexecdir = $(pyexecdir)
> 
>@@ -19,9 +18,9 @@ if PLATFORM_WIN32
> common_ldflags += -no-undefined
> endif
> 
>-libpyglib_2_0_@PYTHON_BASENAME@_la_CFLAGS = $(GLIB_CFLAGS)
>-libpyglib_2_0_@PYTHON_BASENAME@_la_LIBADD = $(GLIB_LIBS) $(FFI_LIBS) $(PYTHON_LIBS)
>-libpyglib_2_0_@PYTHON_BASENAME@_la_SOURCES = 	\
>+libpyglib_@PLATFORM_VERSION_U@_@PYTHON_BASENAME@_la_CFLAGS = $(GLIB_CFLAGS)
>+libpyglib_@PLATFORM_VERSION_U@_@PYTHON_BASENAME@_la_LIBADD = $(GLIB_LIBS) $(FFI_LIBS) $(PYTHON_LIBS)
>+libpyglib_@PLATFORM_VERSION_U@_@PYTHON_BASENAME@_la_SOURCES = 	\
> 	pyglib.c		\
> 	pyglib.h		\
> 	pyglib-private.h 	\
>@@ -29,7 +28,7 @@ libpyglib_2_0_@PYTHON_BASENAME@_la_SOURCES = 	\
> 
> _glib_la_CFLAGS = $(GLIB_CFLAGS)
> _glib_la_LDFLAGS = $(common_ldflags) -export-symbols-regex "_glib|PyInit__glib"
>-_glib_la_LIBADD = $(GLIB_LIBS) libpyglib-2.0-@PYTHON_BASENAME@.la
>+_glib_la_LIBADD = $(GLIB_LIBS) libpyglib-@PLATFORM_VERSION@-@PYTHON_BASENAME@.la
> _glib_la_SOURCES = 	 	\
> 	glibmodule.c	 	\
> 	pygiochannel.c 	 	\
>diff --git a/gobject/Makefile.am b/gobject/Makefile.am
>index 7208329..162a280 100644
>--- a/gobject/Makefile.am
>+++ b/gobject/Makefile.am
>@@ -1,6 +1,3 @@
>-AUTOMAKE_OPTIONS = 1.7
>-PLATFORM_VERSION = 2.0
>-
> pkgincludedir = $(includedir)/pygtk-$(PLATFORM_VERSION)
> pkginclude_HEADERS = pygobject.h
> 
>@@ -35,7 +32,7 @@ _gobject_la_LDFLAGS = $(common_ldflags) -export-symbols-regex "_gobject|PyInit__
> _gobject_la_LIBADD = \
> 	$(GLIB_LIBS) \
> 	$(FFI_LIBS) \
>-	$(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
>+	$(top_builddir)/glib/libpyglib-@PLATFORM_VERSION@-@PYTHON_BASENAME@.la
> _gobject_la_SOURCES =           \
>         gobjectmodule.c         \
>         pygboxed.c              \
>-- 
>1.7.4
>
Comment 3 Ignacio Casal Quinteiro (nacho) 2011-02-09 21:09:40 UTC
Created attachment 180515 [details] [review]
platform version v3

With the aclocal stuff put again
Comment 4 Johan (not receiving bugmail) Dahlin 2011-08-06 12:16:47 UTC
Review of attachment 180515 [details] [review]:

If this is all relevant s/2.0/$PLATFORM_VERSION/ then it looks good to me, as long as it's properly tested.
Comment 5 Ignacio Casal Quinteiro (nacho) 2011-08-06 12:39:53 UTC
The problem is that for the glib part it doesn't work for some reason, and when I made it I couldn't find the reason.
Comment 6 Ignacio Casal Quinteiro (nacho) 2011-08-06 13:24:41 UTC
Created attachment 193346 [details] [review]
platform version v4

So here it is another version of the patch but as you can see in glib/Makefile.am the vars are not used everywhere. For some reason if I try to use it I get a canonical name error.
Comment 7 Dieter Verfaillie 2011-08-06 13:38:22 UTC
libpyglib should probably stay at 2.0, see
https://bugzilla.gnome.org/show_bug.cgi?id=642048#c29 and
https://bugzilla.gnome.org/show_bug.cgi?id=642048#c30
Comment 8 Johan (not receiving bugmail) Dahlin 2011-08-06 20:37:13 UTC
(In reply to comment #7)
> libpyglib should probably stay at 2.0, see
> https://bugzilla.gnome.org/show_bug.cgi?id=642048#c29 and
> https://bugzilla.gnome.org/show_bug.cgi?id=642048#c30

Not so sure, the packages will not be parallel installable if both of them install the same library.

If we want to stay with libpylib-2.0 then we need to split out the pyglib bindings into a separate project and make both the 2.0 and 3.0 bindings depend on pyglib, doesn't really seem to be worth it to me.
Comment 9 Dieter Verfaillie 2011-08-06 22:06:38 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > libpyglib should probably stay at 2.0, see
> > https://bugzilla.gnome.org/show_bug.cgi?id=642048#c29 and
> > https://bugzilla.gnome.org/show_bug.cgi?id=642048#c30
> 
> Not so sure, the packages will not be parallel installable if both of them
> install the same library.

With John's patches from that bug report pygobject-3.0 installs
libpyglib-gi-2.0-... whereas 2.28 installs libpyglib-2.0-...
Missed that on first review too.