forked from cloudtools/troposphere
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (46 loc) · 1.52 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
54
55
56
.PHONY: 2to3 3to2 spec test
PYDIRS=setup.py examples scripts tests troposphere
test:
flake8 ${PYDIRS}
TROPO_REAL_BOOL=true 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
spec2:
curl -O --compressed https://d1uauaxba7bl26.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json
/bin/echo -n "Downloaded version: " && jq .ResourceSpecificationVersion CloudFormationResourceSpecification.json
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-38
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}
p38dir=p38
release-test-38:
@echo "Python 3.8 test"
ver=`python -c 'import troposphere; print troposphere.__version__'` && \
rm -rf ${p38dir} && \
python3.8 -m venv ${p38dir} && \
. ${p38dir}/bin/activate && \
pip3.8 install dist/troposphere-$${ver}.tar.gz && \
deactivate && \
rm -rf ${p38dir}
clean:
rm -rf ${p27dir} ${p38dir} troposphere.egg-info