View | Details | Raw Unified | Return to bug 191637 | Differences between
and this patch

Collapse All | Expand All

(-)b/devel/py-setuptools/Makefile (+1 lines)
Lines 2-7 Link Here
2
2
3
PORTNAME=	setuptools
3
PORTNAME=	setuptools
4
PORTVERSION=	5.4.1
4
PORTVERSION=	5.4.1
5
PORTREVISION=	1
5
CATEGORIES=	devel python
6
CATEGORIES=	devel python
6
MASTER_SITES=	CHEESESHOP
7
MASTER_SITES=	CHEESESHOP
7
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
8
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
(-)b/devel/py-setuptools/files/patch-setuptools_command_install_lib.py (+35 lines)
Added Link Here
1
--- setuptools/command/install_lib.py.orig	2014-07-05 18:05:55.000000000 +0200
2
+++ setuptools/command/install_lib.py	2014-07-20 21:06:16.000000000 +0200
3
@@ -1,5 +1,5 @@
4
 import distutils.command.install_lib as orig
5
-import os
6
+import os, imp
7
 
8
 
9
 class install_lib(orig.install_lib):
10
@@ -17,12 +17,24 @@
11
         nsp = self.distribution.namespace_packages
12
         svem = (nsp and self.get_finalized_command('install')
13
                 .single_version_externally_managed)
14
+        exclude_names = ['__init__.py', '__init__.pyc', '__init__.pyo']
15
+        if hasattr(imp, 'get_tag') :
16
+            exclude_names.extend((
17
+                os.path.join(
18
+                    '__pycache__',
19
+                    '__init__.' + imp.get_tag() + '.pyc'
20
+                ),
21
+                os.path.join(
22
+                    '__pycache__',
23
+                    '__init__.' + imp.get_tag() + '.pyo'
24
+                ),
25
+            ))
26
         if svem:
27
             for pkg in nsp:
28
                 parts = pkg.split('.')
29
                 while parts:
30
                     pkgdir = os.path.join(self.install_dir, *parts)
31
-                    for f in '__init__.py', '__init__.pyc', '__init__.pyo':
32
+                    for f in exclude_names :
33
                         exclude[os.path.join(pkgdir, f)] = 1
34
                     parts.pop()
35
         return exclude

Return to bug 191637