@@ -9,54 +9,53 @@ this can help.
99
1010Method based on the articles:
1111
12- * http://peterdowns.com/posts/first-time-with-pypi.html and
13- * https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/
12+ * http://peterdowns.com/posts/first-time-with-pypi.html and
13+ * https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/
1414
1515
1616Deployment also heavily uses the ` ./deploy.sh ` script in this folder.
1717At this time, running ` ./deploy.sh --help ` displays:
1818
19- ```
20- Usage: ./deploy.sh {build|test|and so on ...}
19+ Usage: ./deploy.sh {build|test|and so on ...}
2120
22- This script is to maintain a consistent method of deployment and testing.
21+ This script is to maintain a consistent method of deployment and testing.
2322
24- Deployment target: pygcode 0.1.1.dev0
23+ Deployment target: pygcode 0.2.0
2524
26- Arguments:
27- Setup:
28- setup: Installs packages & sets up environment (requires sudo)
25+ Arguments:
26+ Setup:
27+ setup: Installs packages & sets up environment (requires sudo)
2928
30- Compiling:
31- build: Execute setup to build packages (populates ../dist/)
32- creates both 'sdist' and 'wheel' distrobutions.
29+ Compiling:
30+ build: Execute setup to build packages (populates ../dist/)
31+ creates both 'sdist' and 'wheel' distrobutions.
3332
34- Virtual Environments:
35- rmenv py# Remove virtual environment
36- remkenv py# Remove, then create re-create virtual environment
37- envprereq py# install environment prerequisites (official PyPi)
33+ Virtual Environments:
34+ lsenv List created virtual environments for this lib
35+ rmenv py# Remove virtual environment
36+ remkenv py# Remove, then create re-create virtual environment
37+ envprereq py# install environment prerequisites (official PyPi)
3838
39- Deploy:
40- deploy test Upload to PyPi test server
41- deploy prod Upload to PyPi (official)
39+ Deploy:
40+ deploy test Upload to PyPi test server
41+ deploy prod Upload to PyPi (official)
4242
43- Install:
44- install sdist py# Install from local sdist
45- install wheel py# Install from local wheel
46- install pypitest py# Install from PyPi test server
47- install pypi py# Install from PyPi (official)
43+ Install:
44+ install sdist py# Install from local sdist
45+ install wheel py# Install from local wheel
46+ install pypitest py# Install from PyPi test server
47+ install pypi py# Install from PyPi (official)
4848
49- Testing:
50- test dev py# Run tests on local dev in a virtual env
51- test installed py# Run tests on installed library in virtual env
49+ Testing:
50+ test dev py# Run tests on local dev in a virtual env
51+ test installed py# Run tests on installed library in virtual env
5252
53- Help:
54- -h | --help display this help message
53+ Help:
54+ -h | --help display this help message
5555
56- py#: when referenced above means
57- 'py2' for Python 2.7.12
58- 'py3' for Python 3.5.2
59- ```
56+ py#: when referenced above means
57+ 'py2' for Python 2.7.12
58+ 'py3' for Python 3.5.2
6059
6160# PyPi deployment
6261
@@ -68,82 +67,77 @@ Arguments:
6867
6968` cat ~/.pypirc `
7069
71- ```
72- [distutils]
73- index-servers =
74- prod
75- test
70+ [distutils]
71+ index-servers =
72+ prod
73+ test
7674
77- [prod]
78- repository = https://upload.pypi.org/legacy/
79- username=FraggaMuffin
80- password=secret
75+ [prod]
76+ repository = https://upload.pypi.org/legacy/
77+ username=FraggaMuffin
78+ password=secret
8179
82- [test]
83- repository=https://test.pypi.org/legacy/
84- username=FraggaMuffin
85- password=secret
86- ```
80+ [test]
81+ repository=https://test.pypi.org/legacy/
82+ username=FraggaMuffin
83+ password=secret
8784
8885` chmod 600 ~/.pypirc `
8986
9087
9188## Build and Test ` sdist ` and ` wheel `
9289
9390** Build**
94- ```
95- ./deploy.sh build
96- ```
91+
92+ ./deploy.sh build
9793
9894** Test ` sdist ` **
99- ```
100- # Python 2.x
101- ./deploy.sh remkenv py2
102- ./deploy.sh envprereq py2
103- ./deploy.sh install sdist py2
104- ./deploy.sh test installed py2
105-
106- # Python 3.x
107- ./deploy.sh remkenv py3
108- ./deploy.sh envprereq py3
109- ./deploy.sh install sdist py3
110- ./deploy.sh test installed py3
111- ```
95+
96+ # Python 2.x
97+ ./deploy.sh remkenv py2
98+ ./deploy.sh envprereq py2
99+ ./deploy.sh install sdist py2
100+ ./deploy.sh test installed py2
101+
102+ # Python 3.x
103+ ./deploy.sh remkenv py3
104+ ./deploy.sh envprereq py3
105+ ./deploy.sh install sdist py3
106+ ./deploy.sh test installed py3
112107
113108** Test ` wheel ` **
114- ```
115- # Python 2.x
116- ./deploy.sh remkenv py2
117- ./deploy.sh install wheel py2
118- ./deploy.sh test installed py2
119109
120- # Python 3.x
121- ./deploy.sh remkenv py3
122- ./deploy.sh install wheel py3
123- ./deploy.sh test installed py3
124- ```
110+ # Python 2.x
111+ ./deploy.sh remkenv py2
112+ ./deploy.sh install wheel py2
113+ ./deploy.sh test installed py2
114+
115+ # Python 3.x
116+ ./deploy.sh remkenv py3
117+ ./deploy.sh install wheel py3
118+ ./deploy.sh test installed py3
119+
125120
126121
127122## Upload to PyPi Test server
128123
129- ```
130- ./deploy.sh deploy test
131- ```
124+
125+ ./deploy.sh deploy test
126+
132127
133128** Test**
134- ```
135- # Python 2.x
136- ./deploy.sh remkenv py2
137- ./deploy.sh envprereq py2
138- ./deploy.sh install pypitest py2
139- ./deploy.sh test installed py2
140-
141- # Python 3.x
142- ./deploy.sh remkenv py3
143- ./deploy.sh envprereq py3
144- ./deploy.sh install pypitest py3
145- ./deploy.sh test installed py3
146- ```
129+
130+ # Python 2.x
131+ ./deploy.sh remkenv py2
132+ ./deploy.sh envprereq py2
133+ ./deploy.sh install pypitest py2
134+ ./deploy.sh test installed py2
135+
136+ # Python 3.x
137+ ./deploy.sh remkenv py3
138+ ./deploy.sh envprereq py3
139+ ./deploy.sh install pypitest py3
140+ ./deploy.sh test installed py3
147141
148142have a look at:
149143https://testpypi.python.org/pypi/pygcode
@@ -154,22 +148,19 @@ to make sure it's sane
154148
155149all good!? sweet :+1 : time to upload to 'production'
156150
157- ```
158- ./deploy.sh deploy prod
159- ```
151+ ./deploy.sh deploy prod
160152
161153** Test**
162- ```
163- # Python 2.x
164- ./deploy.sh remkenv py2
165- ./deploy.sh install pypi py2
166- ./deploy.sh test installed py2
167-
168- # Python 3.x
169- ./deploy.sh remkenv py3
170- ./deploy.sh install pypi py3
171- ./deploy.sh test installed py3
172- ```
154+
155+ # Python 2.x
156+ ./deploy.sh remkenv py2
157+ ./deploy.sh install pypi py2
158+ ./deploy.sh test installed py2
159+
160+ # Python 3.x
161+ ./deploy.sh remkenv py3
162+ ./deploy.sh install pypi py3
163+ ./deploy.sh test installed py3
173164
174165have a look at:
175166https://pypi.python.org/pypi/pygcode
@@ -178,15 +169,32 @@ to make sure it's sane
178169
179170# Deployment in Git
180171
181- merge deployed branch to ` master ` , then...
172+ create pull request ` develop ` -> ` master `
173+
174+ ## Update change log
175+
176+ update [ change log] ( ../dist/README.md )
177+
178+ ## Push Release to Git (aka ` tag ` )
179+
180+ merge ` develop ` branch to ` master ` , then...
182181
183- ```
184- git checkout master
185- git pull
186- git tag ${version} -m "<change description>"
187- git push --tags origin master
188- ```
182+ Switch local to ` master ` and tag with relevant version
189183
190- have a look at the [ releases page] ( https://github.com/fragmuffin/pygcode/releases ) and it should be there.
184+ git checkout master
185+ git pull
186+ git tag ${version} -m "<change description>"
187+ git push --tags origin master
188+
189+ have a look at the
190+ [ releases page] ( https://github.com/fragmuffin/pygcode/releases )
191+ and it should be there.
192+
193+ edit release and copy relevant content from [ change log] ( ../dist/README.md )
191194
192195tadaaaaaa!... go to sleep; it's probably late
196+
197+ # Cleanup
198+
199+ ./deploy.sh rmenv py2
200+ ./deploy.sh rmenv py3
0 commit comments