-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
65 lines (49 loc) · 1.7 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
from setuptools.command.install import install as _install
from setuptools import setup, find_packages
import codecs
import sys
import os
reqs = [line.strip() for line in open('requirements.txt').readlines()]
requirements = list(filter(None, reqs))
# Post install script, if needed
def _post_install(dir):
from subprocess import call
call([sys.executable, 'post_install.py'],
cwd=os.path.join(dir, 'nidm','script'))
class install(_install):
def run(self):
_install.run(self)
self.execute(_post_install, (self.install_lib,),
msg="Running post-install script...")
here = os.path.abspath(os.path.dirname(__file__))
# Get the long description from the relevant file
with codecs.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
# Application name:
name="nidm",
# Version number (initial):
version="1.0.0",
# Application author details:
author="NIDM Working Group",
author_email="vsochat@stanford.edu",
# Packages
packages=find_packages(),
# Data files
include_package_data=True,
zip_safe=False,
# Details
url="https://github.com/incf-nidash/nidm-api",
license="LICENSE.txt",
description="Python module and application for running a REST API server to perform queries and visualize graphs with NIDM results, experiments, and workflows.",
long_description=long_description,
keywords='neuroscience, NIDM',
install_requires = requirements,
entry_points = {
'console_scripts': [
'nidm=nidm.scripts:main',
],
},
# This will install an updated version of nidm-queries in home
cmdclass={'install': install},
)