-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path_README.dist
81 lines (56 loc) · 3.07 KB
/
_README.dist
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
As of 12/Aug/2015 inspyred has a new observer that use email package. need to edit ec/observers.py and remove the class that uses this and the import
in order to get windows installer to be built (cx_freeze does not like freezing email module it seems)
using git: use git bash in windows. *********s
May have to patch oberver.py as so
#import email
import inspyred
import math
import os
#import smtplib
import time
-- and remove classes referring to email and smtplib
---
running from python prompt (or ide): call swmm_ea_controller.py
Select the correct python version (winpython 2.7.x - note: WinPython-64bit-2.7.6.4 worked well. WinPython-64bit-2.7.10.2 did not work! Selecting an older version is OK. ) and open the command prompt.
pip install SWMM5 --upgrade (and make sure the correct version of swmm library is installed. THIS IS KEY!)
Double check by opening a swmm5 file saved by latest epa-swmm binary. IMPORTANT
from swmm5.swmm5tools import SWMM5Simulation, SWMM5Error
ss=SWMM5Simulation("xxxx.inp")
ss.SWMM5_Version() # verify the version from this.
Creating a new version and distribute
a) Change the version details in metadata.py
How/ to distribute (pypi and binaries)
* Checklist
(a) Check the version in metadata.py Check other variables there too (e.g. those contribute to LIST_OF_FILE_GLOBS)
0.1 try the program on ide : call swmm_ea_controller.py
1. Build the stand-alone and windows binary versions
python setup.py bdist_wininst
python setup.py sdist
cd service
python setup.py
(this automatically run install.iss with innosetup too.)\
At this stage install the new swmm5ea and verify that it can manage latest input file versions.
(create a project and load a swmmm file - new version - then initialize. If no error, then all is fine. But to make sure run a optimization)
00. update the front page of pypi package with
python setup.py check --restructuredtext
(^ to check the README.txt files rst formatting)
python setup.py register (if authentication problems, delete .pypirc file (%HOME%\.pypirc) and try again
NOTE: The uploader will offer to store the login information. Say YES (But at the end of all uploads be sure to delete it. del %HOME%\pypirc )
0. Update documentation as follows (to be hosted at http://pythonhosted.org/SWMM5_EA)
easy_install sphinx-pypi-upload
python setup.py build_sphinx
(be aware of warnings. If complains of lack of LaTeX, install texlive for windows http://www.tug.org/texlive/acquire-netinstall.html)
python setup.py upload_sphinx (this step needs the stored credentials from step 00)
upload to pypi with
twine upload --username xxxxxx --password yyyyy <filename> xxxxx-short, yyyyy, ^@
filename - tar.gz and wininst
Now update the source repository.
(do in git-bash for windows)
Check everything and commit and push
git status
git commit -am "message"
git push origin master
Create a release on github (use github web interface). Zip and upload windows installer to the release page.
FINALLY:
del %HOME%\.pypirc
To get rid of stored login information