This repository has been archived by the owner on Sep 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
69 lines (60 loc) · 2.32 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Jack C. Cook
# Tuesday, February 2, 2021
from setuptools import setup, find_packages
import subprocess
import sys
import os
try:
import git
except ModuleNotFoundError:
subprocess.call([sys.executable, '-m', 'pip', 'install', 'gitpython'])
import git
def getreqs(fname):
"""
Get the requirements list from the text file
JCC 03.10.2020
:param fname: the name of the requirements text file
:return: a list of requirements
"""
file = open(fname)
data = file.readlines()
file.close()
return [data[i].replace('\n', '') for i in range(len(data))]
def pull_first():
"""This script is in a git directory that can be pulled."""
cwd = os.getcwd()
gitdir = os.path.dirname(os.path.realpath(__file__))
os.chdir(gitdir)
g = git.cmd.Git(gitdir)
try:
# g.execute(['git', 'lfs', 'pull']) # this is for the git-lfs tracked files
g.execute(['git', 'submodule', 'update', '--init']) # this is to pull in the submodule(s)
except git.exc.GitCommandError:
raise RuntimeError("Make sure git-lfs is installed!")
os.chdir(cwd)
pull_first()
# read the contents of your README file
# https://packaging.python.org/guides/making-a-pypi-friendly-readme/#including-your-readme-in-your-package-s-metadata
from os import path
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(name='gFunctionDatabase',
install_requires=['matplotlib>=3.3.4',
'numpy>=1.19.2',
'Pillow>=8.1.0',
'scipy>=1.6.2',
'pandas>=1.3.2',
'natsort>=7.1.1'],
url='https://github.com/j-c-cook/gFunctionDatabase',
download_url='https://github.com/j-c-cook/gFunctionDatabase/archive/v0.3.tar.gz',
long_description=long_description,
long_description_content_type='text/markdown',
version='0.3',
packages=find_packages(),
include_package_data=True,
author='Jack C. Cook',
author_email='jack.cook@okstate.edu',
description='A g-function database with a database management system '
'for data retrieval, updates and application to be used in'
'geothermal ground heat exchanger design.')