[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Xpra to publicly expose its modules



Dear Ahmed,

At the moment xpra installs its modules privately to /usr/lib/xpra/xpra.

While this path appears to be incorrect due to unnecessary nesting we have a 
bigger problem with hiding xpra modules which should be exposed publicly 
because Xpra is both application and a library.

Although Xpra is mainly an application its modules can be used by frontends  
like "winswitch", packaged by yours truly. In particular winswitch have an 
ugly workaround [1] to find private Xpra modules. This is something upstream 
already complained to me about.

There are some other concerns articulated by upstream. From our discussion:

Me: "python-apps packaging team is clearly advise to install private modules
     whenever possible probably to avoid python namespace collision."

Upstream: "Looks totally wrong to me, especially seeing that we have python
           compiled extensions in wimpiggy and xpra (linked against libpython)
           and that python3 code is quite different too.
           Using /usr/lib/xpra means that you cannot have xpra installed
           against more than one python version. whereas the default/standard
           /usr/lib*/pythonN.N/site-packages/xpra allows that.
           IMO, the most compelling argument for shipping xpra in the regular
           installation path used by all python applications (except on
           debian.) and not in /usr/lib is going to be that xpra has shared
           objects linked with libpython, and one may want multiple versions
           of python installed, each with xpra - this is not possible with a
           single xpra in /usr/lib.. After all, winswitch could (and should?)
           fallback to the less optimal parsing of the "xpra --version"
           command line when loading the python package directly fails.

Considering the above I'm attaching the patch to install Xpra modules to 
default location i.e. to /usr/lib/python2.N/dist-packages/xpra.

After well over one month since I applied for membership in "Python 
Applications Packaging Team" I still got no reply to my application so I can't 
apply this patch myself. 
Anyway because this change could be considered controversial I wouldn't commit
it without your consent. 

Also I'm CCing to debian-python in order to double check with the team that 
we're not going against policy or best practice.

Please advise.

Thank you.

Best regards,
Dmitry.

[1]: https://winswitch.org/trac/changeset/5055
From f2a0235c1aeb373026da900ed47bd6bd51320a1b Mon Sep 17 00:00:00 2001
From: Dmitry Smirnov <onlyjob@member.fsf.org>
Date: Tue, 18 Sep 2012 18:11:51 +1000
Subject: [PATCH] xpra to publicly expose its modules.

 Xpra is both application and a library.
 Exposing modules publicly will simplify interaction with
 frontends like winswitch and will allow to install for more
 than one python version. The latter may be of concern
 due to some bindings that may be sensitive to python version.
---
 debian/changelog                |    3 +++
 debian/patches/private-pkg.diff |   44 ---------------------------------------
 debian/patches/series           |    1 -
 debian/xpra.install             |    2 +-
 4 files changed, 4 insertions(+), 46 deletions(-)
 delete mode 100644 debian/patches/private-pkg.diff
 delete mode 100644 debian/patches/series

diff --git a/debian/changelog b/debian/changelog
index 3ec5f5c..03bc27d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,8 +3,11 @@ xpra (0.3.6+dfsg-2) UNRELEASED; urgency=low
   * NOT RELEASED YET
   * debian/README.Debian: Remove Known issues section, it is invalidated with
     0.3.6 release.
 
+  [ Dmitry Smirnov ]
+  * Dropped private-pkg.diff in order to publicly expose xpra modules.
+
  -- أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy@sabily.org>  Sun, 19 Aug 2012 09:04:44 +0200
 
 xpra (0.3.6+dfsg-1) unstable; urgency=low
 
diff --git a/debian/patches/private-pkg.diff b/debian/patches/private-pkg.diff
deleted file mode 100644
index 0d4aed7..0000000
--- a/debian/patches/private-pkg.diff
+++ /dev/null
@@ -1,44 +0,0 @@
-Description: Add /usr/lib/xpra to sys.path for xpra script and /usr/lib/parti 
- to sys.path for parti script.
-Author: أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy@sabily.org>
-Forwarded: not-needed
---- a/scripts/parti
-+++ b/scripts/parti
-@@ -1,6 +1,7 @@
- #!/usr/bin/env python
- 
- import sys
-+sys.path.append("/usr/lib/parti")
- import parti.scripts.main
- 
- parti.scripts.main.main(sys.argv)
---- a/scripts/parti-repl
-+++ b/scripts/parti-repl
-@@ -1,6 +1,7 @@
- #!/usr/bin/env python
- 
- import sys
-+sys.path.append("/usr/lib/parti")
- import parti.scripts.repl
- 
- parti.scripts.repl.main(sys.argv)
---- a/scripts/xpra
-+++ b/scripts/xpra
-@@ -1,6 +1,7 @@
- #!/usr/bin/env python
- 
- import sys
-+sys.path.append("/usr/lib/xpra")
- import xpra.scripts.main
- 
- sys.exit(xpra.scripts.main.main(__file__, sys.argv))
---- a/scripts/xpra_launcher	2012-06-03 19:16:59.330360871 +0200
-+++ b/scripts/xpra_launcher	2012-06-03 19:20:40.515457660 +0200
-@@ -1,5 +1,7 @@
- #!/usr/bin/env python
- 
-+import sys
-+sys.path.append("/usr/lib/xpra")
- from xpra.scripts.client_launcher import main
- 
- main()
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 9a23cd6..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-private-pkg.diff
diff --git a/debian/xpra.install b/debian/xpra.install
index d6b384c..564dcac 100644
--- a/debian/xpra.install
+++ b/debian/xpra.install
@@ -1,5 +1,5 @@
-usr/lib/*/*/xpra usr/lib/xpra/
+usr/lib/*/*/xpra
 usr/bin/xpra
 usr/bin/xpra_launcher
 usr/share/xpra/icons
 usr/share/applications
-- 
1.7.10.4

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: