Patchwork [evolve-ext] setup: allow including inhibit in the build

login
register
mail settings
Submitter Durham Goode
Date April 6, 2015, 6:21 p.m.
Message ID <cf846d47bb7e8bf0f354.1428344502@dev2000.prn2.facebook.com>
Download mbox | patch
Permalink /patch/8511/
State Accepted
Headers show

Comments

Durham Goode - April 6, 2015, 6:21 p.m.
# HG changeset patch
# User Durham Goode <durham@fb.com>
# Date 1428344480 25200
#      Mon Apr 06 11:21:20 2015 -0700
# Node ID cf846d47bb7e8bf0f354590833fb76803f528774
# Parent  3625d006e81b5d860609533f90b3167bc9a9dd21
setup: allow including inhibit in the build

Adds the INCLUDE_INHIBIT environment variable to allow including the inhibit
extension in the build.
Pierre-Yves David - April 6, 2015, 6:45 p.m.
On 04/06/2015 11:21 AM, Durham Goode wrote:
> # HG changeset patch
> # User Durham Goode<durham@fb.com>
> # Date 1428344480 25200
> #      Mon Apr 06 11:21:20 2015 -0700
> # Node ID cf846d47bb7e8bf0f354590833fb76803f528774
> # Parent  3625d006e81b5d860609533f90b3167bc9a9dd21
> setup: allow including inhibit in the build

pushed to the clowncopter.
Pierre-Yves David - April 6, 2015, 7:02 p.m.
On 04/06/2015 11:45 AM, Pierre-Yves David wrote:
>
>
> On 04/06/2015 11:21 AM, Durham Goode wrote:
>> # HG changeset patch
>> # User Durham Goode<durham@fb.com>
>> # Date 1428344480 25200
>> #      Mon Apr 06 11:21:20 2015 -0700
>> # Node ID cf846d47bb7e8bf0f354590833fb76803f528774
>> # Parent  3625d006e81b5d860609533f90b3167bc9a9dd21
>> setup: allow including inhibit in the build
>
> pushed to the clowncopter.

s/clowncopter/evolve-main/


>

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,7 @@ 
 # Copied from histedit setup.py
 # Credit to Augie Fackler <durin42@gmail.com>
 
+import os
 from distutils.core import setup
 from os.path import dirname, join
 
@@ -14,6 +15,13 @@  def get_version(relpath):
           if "'" in line:
             return line.split("'")[1]
 
+py_modules = [
+    'hgext.evolve',
+]
+
+if os.environ.get('INCLUDE_INHIBIT'):
+    py_modules.append('hgext.inhibit')
+
 setup(
     name='hg-evolve',
     version=get_version('hgext/evolve.py'),
@@ -25,5 +33,5 @@  setup(
     long_description=open('README').read(),
     keywords='hg mercurial',
     license='GPLv2+',
-    py_modules=['hgext.evolve'],
+    py_modules=py_modules
 )