mirror of https://gitlab.com/ita1024/waf.git
Merge branch 'pip_integration' into 'master'
Pip integration See merge request ita1024/waf!2253
This commit is contained in:
commit
ba3135c52b
|
@ -0,0 +1,25 @@
|
||||||
|
import setuptools
|
||||||
|
import sys
|
||||||
|
sys.path.insert(0,'..')
|
||||||
|
import waflib.Context
|
||||||
|
|
||||||
|
with open("../README.md", "r") as fh:
|
||||||
|
long_description = fh.read()
|
||||||
|
|
||||||
|
setuptools.setup(
|
||||||
|
name="waf",
|
||||||
|
version=waflib.Context.WAFVERSION,
|
||||||
|
author="Thomas Nagy",
|
||||||
|
author_email="author@example.com",
|
||||||
|
description="Build Framework",
|
||||||
|
long_description=long_description,
|
||||||
|
long_description_content_type="text/markdown",
|
||||||
|
url="https://gitlab.com/ita1024/waf",
|
||||||
|
package_dir={'': '../'},
|
||||||
|
packages=['waflib', 'waflib/Tools', 'waflib/extras'],
|
||||||
|
scripts=['../waf-light'],
|
||||||
|
classifiers=[
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"Operating System :: OS Independent",
|
||||||
|
],
|
||||||
|
)
|
11
waf-light
11
waf-light
|
@ -130,6 +130,15 @@ def test(dir):
|
||||||
except OSError:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def test_syspath():
|
||||||
|
for dir in sys.path:
|
||||||
|
try:
|
||||||
|
os.stat(join(dir, 'waflib'))
|
||||||
|
return True
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
|
return False
|
||||||
|
|
||||||
def find_lib():
|
def find_lib():
|
||||||
src = os.path.abspath(inspect.getfile(inspect.getmodule(err)))
|
src = os.path.abspath(inspect.getfile(inspect.getmodule(err)))
|
||||||
base, name = os.path.split(src)
|
base, name = os.path.split(src)
|
||||||
|
@ -142,6 +151,7 @@ def find_lib():
|
||||||
if name.endswith('waf-light'):
|
if name.endswith('waf-light'):
|
||||||
w = test(base)
|
w = test(base)
|
||||||
if w: return w
|
if w: return w
|
||||||
|
if test_syspath(): return None
|
||||||
err('waf-light requires waflib -> export WAFDIR=/folder')
|
err('waf-light requires waflib -> export WAFDIR=/folder')
|
||||||
|
|
||||||
dirname = '%s-%s-%s' % (WAF, VERSION, REVISION)
|
dirname = '%s-%s-%s' % (WAF, VERSION, REVISION)
|
||||||
|
@ -159,6 +169,7 @@ def find_lib():
|
||||||
return dir
|
return dir
|
||||||
|
|
||||||
wafdir = find_lib()
|
wafdir = find_lib()
|
||||||
|
if wafdir is not None:
|
||||||
sys.path.insert(0, wafdir)
|
sys.path.insert(0, wafdir)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in New Issue