2021-02-18 06:04:30 +01:00
|
|
|
from setuptools import setup
|
|
|
|
|
2021-12-20 09:14:04 +01:00
|
|
|
# import configparser
|
2021-02-18 06:04:30 +01:00
|
|
|
import os
|
2021-11-08 09:58:22 +01:00
|
|
|
|
2021-12-20 09:14:04 +01:00
|
|
|
# import time
|
|
|
|
|
|
|
|
# from cic_cache.version import (
|
2021-11-08 09:58:22 +01:00
|
|
|
# version_object,
|
|
|
|
# version_string
|
|
|
|
# )
|
|
|
|
#
|
2021-12-20 09:14:04 +01:00
|
|
|
# class PleaseCommitFirstError(Exception):
|
2021-11-08 09:58:22 +01:00
|
|
|
# pass
|
|
|
|
#
|
2021-12-20 09:14:04 +01:00
|
|
|
# def git_hash():
|
2021-11-08 09:58:22 +01:00
|
|
|
# import subprocess
|
|
|
|
# git_diff = subprocess.run(['git', 'diff'], capture_output=True)
|
|
|
|
# if len(git_diff.stdout) > 0:
|
|
|
|
# raise PleaseCommitFirstError()
|
|
|
|
# git_hash = subprocess.run(['git', 'rev-parse', 'HEAD'], capture_output=True)
|
|
|
|
# git_hash_brief = git_hash.stdout.decode('utf-8')[:8]
|
|
|
|
# return git_hash_brief
|
|
|
|
#
|
2021-12-20 09:14:04 +01:00
|
|
|
# version_string = str(version_object)
|
2021-11-08 09:58:22 +01:00
|
|
|
#
|
2021-12-20 09:14:04 +01:00
|
|
|
# try:
|
2021-11-08 09:58:22 +01:00
|
|
|
# version_git = git_hash()
|
|
|
|
# version_string += '+build.{}'.format(version_git)
|
2021-12-20 09:14:04 +01:00
|
|
|
# except FileNotFoundError:
|
2021-11-08 09:58:22 +01:00
|
|
|
# time_string_pair = str(time.time()).split('.')
|
|
|
|
# version_string += '+build.{}{:<09d}'.format(
|
|
|
|
# time_string_pair[0],
|
|
|
|
# int(time_string_pair[1]),
|
|
|
|
# )
|
2021-12-20 09:14:04 +01:00
|
|
|
# print('final version string will be {}'.format(version_string))
|
2021-02-18 06:04:30 +01:00
|
|
|
|
|
|
|
requirements = []
|
|
|
|
f = open('requirements.txt', 'r')
|
|
|
|
while True:
|
|
|
|
l = f.readline()
|
|
|
|
if l == '':
|
|
|
|
break
|
|
|
|
requirements.append(l.rstrip())
|
|
|
|
f.close()
|
|
|
|
|
|
|
|
test_requirements = []
|
|
|
|
f = open('test_requirements.txt', 'r')
|
|
|
|
while True:
|
|
|
|
l = f.readline()
|
|
|
|
if l == '':
|
|
|
|
break
|
|
|
|
test_requirements.append(l.rstrip())
|
|
|
|
f.close()
|
|
|
|
|
|
|
|
setup(
|
2021-12-20 09:14:04 +01:00
|
|
|
# version=version_string,
|
2021-02-18 06:04:30 +01:00
|
|
|
install_requires=requirements,
|
|
|
|
tests_require=test_requirements,
|
|
|
|
)
|