2013-10-26 19:59:26 +00:00
|
|
|
#!/usr/bin/env python
|
2015-01-24 13:23:14 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2020-11-16 15:31:42 +00:00
|
|
|
from io import open as io_open
|
|
|
|
from setuptools import setup
|
2015-10-11 16:55:34 +00:00
|
|
|
import os
|
2015-11-01 16:01:18 +00:00
|
|
|
import sys
|
2016-06-05 14:50:29 +00:00
|
|
|
|
2018-07-31 08:46:41 +00:00
|
|
|
src_dir = os.path.abspath(os.path.dirname(__file__))
|
2020-11-16 20:05:11 +00:00
|
|
|
if sys.argv[1].lower().strip() == 'make': # exec Makefile commands
|
2019-01-21 00:01:17 +00:00
|
|
|
import pymake
|
2018-07-31 08:46:41 +00:00
|
|
|
fpath = os.path.join(src_dir, 'Makefile')
|
2019-01-21 00:01:17 +00:00
|
|
|
pymake.main(['-f', fpath] + sys.argv[2:])
|
2019-01-19 23:38:47 +00:00
|
|
|
# Stop to avoid setup.py raising non-standard command error
|
2015-11-01 16:01:18 +00:00
|
|
|
sys.exit(0)
|
|
|
|
|
2019-01-21 00:01:17 +00:00
|
|
|
extras_require = {}
|
|
|
|
requirements_dev = os.path.join(src_dir, 'requirements-dev.txt')
|
|
|
|
with io_open(requirements_dev, mode='r') as fd:
|
|
|
|
extras_require['dev'] = [i.strip().split('#', 1)[0].strip()
|
|
|
|
for i in fd.read().strip().split('\n')]
|
|
|
|
|
2020-11-16 20:05:11 +00:00
|
|
|
setup(use_scm_version=True, extras_require=extras_require)
|