Patchwork [3,of,7,v2] setup: only munge mercurial/__init__.py

login
register
mail settings
Submitter timeless@mozdev.org
Date Jan. 12, 2016, 5:23 a.m.
Message ID <475a0e5bf82fc9c94332.1452576185@waste.org>
Download mbox | patch
Permalink /patch/12673/
State Changes Requested
Headers show

Comments

timeless@mozdev.org - Jan. 12, 2016, 5:23 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1452572286 0
#      Tue Jan 12 04:18:06 2016 +0000
# Node ID 475a0e5bf82fc9c943323fa7045a133dfbeb38e2
# Parent  a55eb78c1f0697d658ba78f67641746a4bf119e5
setup: only munge mercurial/__init__.py

Before this, we were also rewriting mercurial/hgweb/__init__.py
and others...
Yuya Nishihara - Jan. 15, 2016, 12:43 p.m.
On Mon, 11 Jan 2016 23:23:05 -0600, timeless wrote:
> # HG changeset patch
> # User timeless <timeless@mozdev.org>
> # Date 1452572286 0
> #      Tue Jan 12 04:18:06 2016 +0000
> # Node ID 475a0e5bf82fc9c943323fa7045a133dfbeb38e2
> # Parent  a55eb78c1f0697d658ba78f67641746a4bf119e5
> setup: only munge mercurial/__init__.py
> 
> Before this, we were also rewriting mercurial/hgweb/__init__.py
> and others...
> 
> diff --git a/setup.py b/setup.py
> --- a/setup.py
> +++ b/setup.py
> @@ -346,7 +346,7 @@
>      def copy_file(self, *args, **kwargs):
>          dst, copied = build_py.copy_file(self, *args, **kwargs)
>  
> -        if copied and dst.endswith('__init__.py'):
> +        if copied and dst.endswith('mercurial/__init__.py'):

It won't work on Windows.

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -346,7 +346,7 @@ 
     def copy_file(self, *args, **kwargs):
         dst, copied = build_py.copy_file(self, *args, **kwargs)
 
-        if copied and dst.endswith('__init__.py'):
+        if copied and dst.endswith('mercurial/__init__.py'):
             if self.distribution.pure:
                 modulepolicy = 'py'
             else: