Skip to content

Commit 8322cd1

Browse files
committed
main
1 parent e95bfb7 commit 8322cd1

File tree

3 files changed

+139
-0
lines changed

3 files changed

+139
-0
lines changed

LICENSE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright <YEAR> <COPYRIGHT HOLDER>
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include README.md LICENSE

setup.py

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
4+
# Note: To use the 'upload' functionality of this file, you must:
5+
# $ pipenv install twine --dev
6+
7+
import io
8+
import os
9+
import sys
10+
from shutil import rmtree
11+
12+
from setuptools import find_packages, setup, Command
13+
14+
# Package meta-data.
15+
NAME = 'modelta'
16+
DESCRIPTION = 'Chen and Yang Lab Multi fork Development cell lineage tree alignment '
17+
URL = 'https://github.com/Chenjy0212/modelta'
18+
EMAIL = '1026224216@qq.com'
19+
AUTHOR = 'EeWhile'
20+
REQUIRES_PYTHON = '>=3.6.0'
21+
VERSION = '0.1.0'
22+
23+
# What packages are required for this module to be executed?
24+
REQUIRED = [
25+
# 'requests', 'maya', 'records',
26+
]
27+
28+
# What packages are optional?
29+
EXTRAS = {
30+
# 'fancy feature': ['django'],
31+
}
32+
33+
# The rest you shouldn't have to touch too much :)
34+
# ------------------------------------------------
35+
# Except, perhaps the License and Trove Classifiers!
36+
# If you do change the License, remember to change the Trove Classifier for that!
37+
38+
here = os.path.abspath(os.path.dirname(__file__))
39+
40+
# Import the README and use it as the long-description.
41+
# Note: this will only work if 'README.md' is present in your MANIFEST.in file!
42+
try:
43+
with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
44+
long_description = '\n' + f.read()
45+
except FileNotFoundError:
46+
long_description = DESCRIPTION
47+
48+
# Load the package's __version__.py module as a dictionary.
49+
about = {}
50+
if not VERSION:
51+
project_slug = NAME.lower().replace("-", "_").replace(" ", "_")
52+
with open(os.path.join(here, project_slug, '__version__.py')) as f:
53+
exec(f.read(), about)
54+
else:
55+
about['__version__'] = VERSION
56+
57+
58+
class UploadCommand(Command):
59+
"""Support setup.py upload."""
60+
61+
description = 'Build and publish the package.'
62+
user_options = []
63+
64+
@staticmethod
65+
def status(s):
66+
"""Prints things in bold."""
67+
print('\033[1m{0}\033[0m'.format(s))
68+
69+
def initialize_options(self):
70+
pass
71+
72+
def finalize_options(self):
73+
pass
74+
75+
def run(self):
76+
try:
77+
self.status('Removing previous builds…')
78+
rmtree(os.path.join(here, 'dist'))
79+
except OSError:
80+
pass
81+
82+
self.status('Building Source and Wheel (universal) distribution…')
83+
os.system('{0} setup.py sdist bdist_wheel --universal'.format(sys.executable))
84+
85+
self.status('Uploading the package to PyPI via Twine…')
86+
os.system('twine upload dist/*')
87+
88+
self.status('Pushing git tags…')
89+
os.system('git tag v{0}'.format(about['__version__']))
90+
os.system('git push --tags')
91+
92+
sys.exit()
93+
94+
95+
# Where the magic happens:
96+
setup(
97+
name=NAME,
98+
version=about['__version__'],
99+
description=DESCRIPTION,
100+
long_description=long_description,
101+
long_description_content_type='text/markdown',
102+
author=AUTHOR,
103+
author_email=EMAIL,
104+
python_requires=REQUIRES_PYTHON,
105+
url=URL,
106+
packages=find_packages(exclude=["tests", "*.tests", "*.tests.*", "tests.*"]),
107+
# If your package is a single module, use this instead of 'packages':
108+
# py_modules=['mypackage'],
109+
110+
# entry_points={
111+
# 'console_scripts': ['mycli=mymodule:cli'],
112+
# },
113+
install_requires=REQUIRED,
114+
extras_require=EXTRAS,
115+
include_package_data=True,
116+
license='MIT',
117+
classifiers=[
118+
# Trove classifiers
119+
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
120+
'License :: OSI Approved :: MIT License',
121+
'Programming Language :: Python',
122+
'Programming Language :: Python :: 3',
123+
'Programming Language :: Python :: 3.6',
124+
'Programming Language :: Python :: Implementation :: CPython',
125+
'Programming Language :: Python :: Implementation :: PyPy'
126+
],
127+
# $ setup.py publish support.
128+
cmdclass={
129+
'upload': UploadCommand,
130+
},
131+
)

0 commit comments

Comments
 (0)