Patchwork [01,of,10] cffi: rename build scripts

login
register
mail settings
Submitter Yuya Nishihara
Date May 28, 2017, 1:05 p.m.
Message ID <84957771591a5c5240cb.1495976706@mimosa>
Download mbox | patch
Permalink /patch/20974/
State Accepted
Headers show

Comments

Yuya Nishihara - May 28, 2017, 1:05 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1493726680 -32400
#      Tue May 02 21:04:40 2017 +0900
# Node ID 84957771591a5c5240cb1cc27b5c2c8d269d8eb4
# Parent  ad37c569ec8121a99e4cd9da52365b114b82e744
cffi: rename build scripts

This frees up cffi package for modules to be split from pure.
Gregory Szorc - May 28, 2017, 6:25 p.m.
On Sun, May 28, 2017 at 6:05 AM, Yuya Nishihara <yuya@tcha.org> wrote:

> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1493726680 -32400
> #      Tue May 02 21:04:40 2017 +0900
> # Node ID 84957771591a5c5240cb1cc27b5c2c8d269d8eb4
> # Parent  ad37c569ec8121a99e4cd9da52365b114b82e744
> cffi: rename build scripts
>

Queued this series. Excellent cleanup! Thanks.


>
> This frees up cffi package for modules to be split from pure.
>
> diff --git a/mercurial/cffi/bdiff.py b/mercurial/cffi/bdiffbuild.py
> rename from mercurial/cffi/bdiff.py
> rename to mercurial/cffi/bdiffbuild.py
> diff --git a/mercurial/cffi/mpatch.py b/mercurial/cffi/mpatchbuild.py
> rename from mercurial/cffi/mpatch.py
> rename to mercurial/cffi/mpatchbuild.py
> diff --git a/mercurial/cffi/osutil.py b/mercurial/cffi/osutilbuild.py
> rename from mercurial/cffi/osutil.py
> rename to mercurial/cffi/osutilbuild.py
> diff --git a/setup.py b/setup.py
> --- a/setup.py
> +++ b/setup.py
> @@ -353,15 +353,15 @@ class hgbuildpy(build_py):
>              self.distribution.ext_modules = []
>          elif self.distribution.cffi:
>              from mercurial.cffi import (
> -                bdiff,
> -                mpatch,
> +                bdiffbuild,
> +                mpatchbuild,
>              )
> -            exts = [mpatch.ffi.distutils_extension(),
> -                    bdiff.ffi.distutils_extension()]
> +            exts = [mpatchbuild.ffi.distutils_extension(),
> +                    bdiffbuild.ffi.distutils_extension()]
>              # cffi modules go here
>              if sys.platform == 'darwin':
> -                from mercurial.cffi import osutil
> -                exts.append(osutil.ffi.distutils_extension())
> +                from mercurial.cffi import osutilbuild
> +                exts.append(osutilbuild.ffi.distutils_extension())
>              self.distribution.ext_modules = exts
>          else:
>              h = os.path.join(get_python_inc(), 'Python.h')
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/mercurial/cffi/bdiff.py b/mercurial/cffi/bdiffbuild.py
rename from mercurial/cffi/bdiff.py
rename to mercurial/cffi/bdiffbuild.py
diff --git a/mercurial/cffi/mpatch.py b/mercurial/cffi/mpatchbuild.py
rename from mercurial/cffi/mpatch.py
rename to mercurial/cffi/mpatchbuild.py
diff --git a/mercurial/cffi/osutil.py b/mercurial/cffi/osutilbuild.py
rename from mercurial/cffi/osutil.py
rename to mercurial/cffi/osutilbuild.py
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -353,15 +353,15 @@  class hgbuildpy(build_py):
             self.distribution.ext_modules = []
         elif self.distribution.cffi:
             from mercurial.cffi import (
-                bdiff,
-                mpatch,
+                bdiffbuild,
+                mpatchbuild,
             )
-            exts = [mpatch.ffi.distutils_extension(),
-                    bdiff.ffi.distutils_extension()]
+            exts = [mpatchbuild.ffi.distutils_extension(),
+                    bdiffbuild.ffi.distutils_extension()]
             # cffi modules go here
             if sys.platform == 'darwin':
-                from mercurial.cffi import osutil
-                exts.append(osutil.ffi.distutils_extension())
+                from mercurial.cffi import osutilbuild
+                exts.append(osutilbuild.ffi.distutils_extension())
             self.distribution.ext_modules = exts
         else:
             h = os.path.join(get_python_inc(), 'Python.h')