setup: on windows only try to build python stuff

Differential Revision: https://phabricator.intern.facebook.com/D4727605
This commit is contained in:
Kostia Balytskyi 2017-03-17 09:04:19 -07:00
parent b7b2cf134a
commit b96abc88d5

View File

@ -5,6 +5,7 @@ from glob import glob
import os, sys
iswindows = os.name == 'nt'
# --component allows the caller to specify what components they want. We can't
# use argparse like normal, because setup() at the bottom has it's own argument
# logic.
@ -115,6 +116,9 @@ def build_libraries(self, libraries):
distutils.command.build_clib.build_clib.build_libraries = build_libraries
# Static c libaries
if iswindows:
libraries = []
else:
libraries = [
("datapack", {
"sources" : ["cdatapack/cdatapack.c"],
@ -141,12 +145,16 @@ availablepymodules = dict([(x[9:], x) for x in hgext3rd])
availablepymodules['statprof'] = 'statprof'
availablepackages = [
'fastannotate',
'fastmanifest',
'infinitepush',
'phabricator',
'sqldirstate',
'remotefilelog',
]
if iswindows:
availablepackages += [
'fastannotate',
'fastmanifest',
'treemanifest',
'linelog',
]
@ -158,7 +166,7 @@ def distutils_dir_name(dname):
platform=distutils.util.get_platform(),
version=sys.version[:3])
if os.name == 'nt':
if iswindows:
# The modules that successfully compile on Windows
availableextmodules = {}
else:
@ -270,7 +278,7 @@ while processdep:
components.append(dep)
processdep = True
if os.name == 'nt':
if iswindows:
# The modules that successfully compile on Windows
cythonmodules = []
else: