This repository has been archived by the owner on Jun 12, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
129 lines (93 loc) · 4.38 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
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# TO EDIT
TAG ?= v1.1.0
GH_USERNAME ?= TomAugspurger
PANDAS_VERSION=$(TAG:v%=%)
PANDAS_BASE_VERSION=$(shell echo $(PANDAS_VERSION) | awk -F '.' '{OFS="."} { print $$1, $$2}')
TARGZ=pandas-$(PANDAS_VERSION).tar.gz
# to ensure pushd and popd works
SHELL := /bin/bash
# -----------------------------------------------------------------------------
# Host filesystem initialization
# -----------------------------------------------------------------------------
init-repos:
git clone https://github.com/pandas-dev/pandas && git -C pandas remote rename origin upstream && git -C pandas remote add origin https://github.com/$(GH_USERNAME)/pandas
git clone https://github.com/conda-forge/pandas-feedstock && git -C pandas-feedstock remote rename origin upstream && git -C pandas-feedstock remote add origin https://github.com/$(GH_USERNAME)/pandas-feedstock
git clone --recursive https://github.com/MacPython/pandas-wheels && git -C pandas-wheels remote rename origin upstream && git -C pandas-wheels remote add origin https://github.com/$(GH_USERNAME)/pandas-wheels
update-repos:
git -C pandas checkout master && git -C pandas pull
git -C pandas-wheels checkout master && git -C pandas-wheels pull
git -C pandas-feedstock checkout master && git -C pandas-feedstock pull
pushd pandas-wheels && git submodule update --recursive --remote && popd
# -----------------------------------------------------------------------------
# Git Tag
# -----------------------------------------------------------------------------
tag:
# This doesn't push the tag
pushd pandas && ../scripts/tag.py $(TAG) && popd
# -----------------------------------------------------------------------------
# Builder Images
# -----------------------------------------------------------------------------
docker-image: pandas
docker build -t pandas-build .
docker-doc:
docker build -t pandas-docs -f docker-files/docs/Dockerfile .
# -----------------------------------------------------------------------------
# sdist
# -----------------------------------------------------------------------------
pandas/dist/$(TARGZ):
docker run -it --rm \
--name=pandas-sdist-build \
-v ${CURDIR}/pandas:/pandas \
-v ${CURDIR}/scripts:/scripts \
pandas-build \
sh /scripts/build_sdist.sh
# -----------------------------------------------------------------------------
# Tests
# These can be done in parallel
# -----------------------------------------------------------------------------
conda-test:
docker run -it --rm \
--name=pandas-conda-test \
--env PANDAS_VERSION=$(PANDAS_VERSION) \
-v ${CURDIR}/pandas:/pandas \
-v ${CURDIR}/recipe:/recipe \
pandas-build \
sh -c "conda build --numpy=1.17.3 --python=3.8 /recipe --output-folder=/pandas/dist"
pip-test: pandas/dist/$(TARGZ)
docker run -it --rm \
--name=pandas-pip-test \
-v ${CURDIR}/pandas:/pandas \
-v ${CURDIR}/scripts/pip_test.sh:/pip_test.sh \
pandas-build /bin/bash /pip_test.sh /pandas/dist/$(TARGZ)
# -----------------------------------------------------------------------------
# Docs
# -----------------------------------------------------------------------------
doc:
docker run -it \
--name=pandas-docs \
-v ${CURDIR}/pandas:/pandas \
-v ${CURDIR}/scripts/build-docs.sh:/build-docs.sh \
pandas-docs \
/build-docs.sh
upload-doc:
rsync -rv -e ssh pandas/doc/build/html/ pandas.pydata.org:/usr/share/nginx/pandas/pandas-docs/version/$(PANDAS_VERSION)/
rsync -rv -e ssh pandas/doc/build/latex/pandas.pdf pandas.pydata.org:/usr/share/nginx/pandas/pandas-docs/version/$(PANDAS_VERSION)/pandas.pdf
link-stable:
ssh pandas.pydata.org "cd /usr/share/nginx/pandas/pandas-docs && ln -sfn version/$(PANDAS_VERSION) stable"
link-version:
ssh pandas.pydata.org "cd /usr/share/nginx/pandas/pandas-docs/version && ln -sfn $(PANDAS_VERSION) $(PANDAS_BASE_VERSION)"
push-doc: | upload-doc link-stable link-version
push-tag:
pushd pandas && ../scripts/push-tag.py $(TAG) && popd
github-release:
echo TODO
conda-forge:
./scripts/conda-forge.sh $(TAG) $(GH_USERNAME)
wheels:
rm -rf pandas/dist/pandas-$(PANDAS_VERSION)-cp37m-linux_x86_64.whl
rm -rf pandas/dist/pandas-$(PANDAS_VERSION)-cp37-cp37m-linux_x86_64.whl
./scripts/wheels.sh $(TAG) $(GH_USERNAME)
download-wheels:
./scripts/download_wheels.py $(PANDAS_VERSION)
upload-pypi:
twine upload pandas/dist/pandas-$(PANDAS_VERSION)*.{whl,tar.gz} --skip-existing