summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Feltman <sfeltman@src.gnome.org>2014-01-08 19:22:08 -0800
committerSimon Feltman <sfeltman@src.gnome.org>2014-01-14 10:19:32 -0800
commit8afd7e880a72a44e6ea46c763bab82146fd75c96 (patch)
treebd42f3020fda842326ab65a39a6d5ead615d0152
parentad565e5bbc9d12607c39be9479bc671a8f2de6e3 (diff)
downloadpygobject-8afd7e880a72a44e6ea46c763bab82146fd75c96.tar.gz
Move Python glib options module into gi package
Move gi/_glib/option.py into gi/_option.py. Remove gi/_glib since it is no longer needed. https://bugzilla.gnome.org/show_bug.cgi?id=712197
-rw-r--r--Makefile.am3
-rw-r--r--configure.ac1
-rw-r--r--gi/Makefile.am1
-rw-r--r--gi/_glib/Makefile.am21
-rw-r--r--gi/_glib/__init__.py20
-rw-r--r--gi/_option.py (renamed from gi/_glib/option.py)2
-rw-r--r--gi/overrides/GLib.py2
-rw-r--r--gi/overrides/GObject.py2
8 files changed, 5 insertions, 47 deletions
diff --git a/Makefile.am b/Makefile.am
index 1c74126b..b0623ffb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -61,7 +61,8 @@ nobase_pyexec_PYTHON = \
gi/docstring.py \
gi/_constants.py \
gi/_propertyhelper.py \
- gi/_signalhelper.py
+ gi/_signalhelper.py \
+ gi/_option.py
# if we build in a separate tree, we need to symlink the *.py files from the
# source tree; Python does not accept the extensions and modules in different
diff --git a/configure.ac b/configure.ac
index 95ad3a93..d9e4661f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -268,7 +268,6 @@ AC_CONFIG_FILES(
gi/Makefile
gi/repository/Makefile
gi/overrides/Makefile
- gi/_glib/Makefile
gi/_gobject/Makefile
examples/Makefile
tests/Makefile
diff --git a/gi/Makefile.am b/gi/Makefile.am
index 354f4072..2d4d1940 100644
--- a/gi/Makefile.am
+++ b/gi/Makefile.am
@@ -1,7 +1,6 @@
SUBDIRS = \
repository \
overrides \
- _glib \
_gobject
extension_cppflags = \
diff --git a/gi/_glib/Makefile.am b/gi/_glib/Makefile.am
deleted file mode 100644
index 423dda46..00000000
--- a/gi/_glib/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-AUTOMAKE_OPTIONS = 1.7
-
-
-pyglibdir = $(pyexecdir)/gi/_glib
-
-pyglib_PYTHON = \
- __init__.py \
- option.py
-
-
-# if we build in a separate tree, we need to symlink the *.py files from the
-# source tree; Python does not accept the extensions and modules in different
-# paths
-build_pylinks:
- for f in $(pyglib_PYTHON); do \
- [ -e $(builddir)/$$f ] || $(LN_S) $(srcdir)/$$f $(builddir)/$$f; \
- done
-
-
-all: build_pylinks
-check-local: build_pylinks
diff --git a/gi/_glib/__init__.py b/gi/_glib/__init__.py
deleted file mode 100644
index 0ea3f795..00000000
--- a/gi/_glib/__init__.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- Mode: Python; py-indent-offset: 4 -*-
-# pygobject - Python bindings for the GObject library
-# Copyright (C) 2006-2012 Johan Dahlin
-#
-# glib/__init__.py: initialisation file for glib module
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-# USA
diff --git a/gi/_glib/option.py b/gi/_option.py
index b4d3050c..0649081d 100644
--- a/gi/_glib/option.py
+++ b/gi/_option.py
@@ -33,7 +33,7 @@ import sys
import optparse
from optparse import OptParseError, OptionError, OptionValueError, \
BadOptionError, OptionConflictError
-from ..module import get_introspection_module
+from .module import get_introspection_module
if sys.version_info >= (3, 0):
_basestring = str
diff --git a/gi/overrides/GLib.py b/gi/overrides/GLib.py
index 73a2567c..b17c69be 100644
--- a/gi/overrides/GLib.py
+++ b/gi/overrides/GLib.py
@@ -33,7 +33,7 @@ GLib = get_introspection_module('GLib')
__all__ = []
-from gi._glib import option
+from gi import _option as option
option # pyflakes
__all__.append('option')
diff --git a/gi/overrides/GObject.py b/gi/overrides/GObject.py
index fe172caf..8c22ac5f 100644
--- a/gi/overrides/GObject.py
+++ b/gi/overrides/GObject.py
@@ -41,7 +41,7 @@ GObjectModule = gi.module.get_introspection_module('GObject')
__all__ = []
-from gi._glib import option
+from gi import _option as option
sys.modules['gi._gobject.option'] = option