-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
90 lines (74 loc) · 2.66 KB
/
setup.py
File metadata and controls
90 lines (74 loc) · 2.66 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
from setuptools import setup, find_packages
import sys
sys.path.insert(0, sys.path[0])
from utils import inject_init
init_path = 'jsonmodel/__init__.py'
readme_path = 'README.rst'
setup_kwargs = {
'include_package_data': True, # Checks MANIFEST.in for explicit rules
'packages': find_packages(),
'install_requires': [],
'classifiers': [
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python',
'Programming Language :: Python :: 3.5'
]
}
setup_kwargs = inject_init(init_path, readme_path, setup_kwargs)
setup(**setup_kwargs)
''' DOCUMENTATION
References:
https://docs.python.org/3.6/distutils/setupscript.html
https://python-packaging-user-guide.readthedocs.org/en/latest/
https://docs.python.org/3.6/distutils/index.html
https://github.com/jgehrcke/python-cmdline-bootstrap
http://www.pyinstaller.org/
Installation Packages:
pip install wheel
pip install twine
Build Distributions:
python setup.py sdist --format=gztar,zip
pip wheel --no-index --no-deps --wheel-dir dist dist/jsonmodel-3.4.tar.gz
Upload (or Register) Distributions to PyPi:
twine upload dist/jsonmodel-3.4*
Upload Documentation to Github:
mkdocs gh-deploy
.gitconfig [credential] helper = wincred
Installation:
pip install [module]
python setup.py develop # for local on-the-fly file updates
python setup.py install # when possessing distribution files
pip install dist/jsonmodel-3.4-py3-none-any.whl # when possessing wheel file
Uninstall:
pip uninstall [module]
python setup.py develop --uninstall # for removing symbolic link
# remove command line tool in ../Python/Python3.6/Scripts/
CLI Installation:
command = 'name of command'
module = 'name of module'
entry_points = {
"console_scripts": ['%s = %s.cli:cli' % (command, module)]
},
System Installation:
# http://www.pyinstaller.org/
Mercurial Dev Setup:
.hgignore (add dist/, *.egg-info/, '.git/')
hgrc [paths] default = ssh://hg@bitbucket.org/collectiveacuity/pocketlab
Git Public Setup:
.gitignore (add dist/, *.egg-info/, dev/, tests_dev/, docs/, docs_dev/, .hg/, .hgignore)
git init
git remote add origin https://github.com/collectiveacuity/pocketLab.git
Git Public Updates:
git add -A
git commit -m 'updates'
git push origin master
Git Remove History: [Run as admin and pause syncing]
git filter-branch --force --index-filter 'git rm -rf --cached --ignore-unmatch dev/*' --prune-empty --tag-name-filter cat -- --all
GitHub.io Documentation:
mkdocs gh-deploy -r origin
'''