forked from cloudtools/troposphere
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (44 loc) · 1.29 KB
/
Makefile
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
.PHONY: 2to3 3to2 spec test
PYDIRS=setup.py examples tests troposphere
test:
pycodestyle ${PYDIRS}
pyflakes ${PYDIRS}
python setup.py test
spec:
curl -O https://d1uauaxba7bl26.cloudfront.net/latest/CloudFormationResourceSpecification.zip
rm -rf spec
mkdir spec
unzip -d spec CloudFormationResourceSpecification.zip
rm CloudFormationResourceSpecification.zip
2to3:
2to3 -n -w examples > 2to3-examples.patch
2to3 -n -w troposphere > 2to3-troposphere.patch
3to2:
git -C examples apply ../2to3-examples.patch -R
git -C troposphere apply ../2to3-troposphere.patch -R
release-test:
python setup.py sdist
make release-test-27
make release-test-37
p27dir=p27
release-test-27:
@echo "Python 2.7 test"
ver=`python -c 'import troposphere; print troposphere.__version__'` && \
rm -rf ${p27dir} && \
virtualenv ${p27dir} && \
. ${p27dir}/bin/activate && \
pip install dist/troposphere-$${ver}.tar.gz && \
deactivate && \
rm -rf ${p27dir}
p37dir=p37
release-test-37:
@echo "Python 3.7 test"
ver=`python -c 'import troposphere; print troposphere.__version__'` && \
rm -rf ${p37dir} && \
python3.7 -m venv ${p37dir} && \
. ${p37dir}/bin/activate && \
pip3.7 install dist/troposphere-$${ver}.tar.gz && \
deactivate && \
rm -rf ${p37dir}
clean:
rm -rf ${p27dir} ${p37dir} troposphere.egg-info