Skip to content

Commit 22fcb3d

Browse files
authored
add requirements.txt of different python versions (#977)
* use 37 and 38 * update readme * update ci as well * adding version update guidance
1 parent dcd34c6 commit 22fcb3d

File tree

5 files changed

+618
-9
lines changed

5 files changed

+618
-9
lines changed

.github/workflows/python_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
run: |
4646
python -m venv venv
4747
source venv/bin/activate
48-
pip install -r python/requirements.txt
48+
pip install -r python/requirements-39.txt
4949
- name: Run Linters
5050
run: |
5151
source venv/bin/activate

python/README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ df = df.aggregate(
119119

120120
```bash
121121
pip install datafusion
122+
# or
123+
python -m pip install datafusion
122124
```
123125

124126
## How to develop
@@ -130,14 +132,20 @@ Bootstrap:
130132
```bash
131133
# fetch this repo
132134
git clone [email protected]:apache/arrow-datafusion.git
133-
135+
# change to python directory
134136
cd arrow-datafusion/python
135-
136137
# prepare development environment (used to build wheel / install in development)
137138
python3 -m venv venv
138139
# activate the venv
139140
source venv/bin/activate
140-
pip install -r requirements.txt
141+
# update pip itself if necessary
142+
python -m pip install -U pip
143+
# if python -V gives python 3.7
144+
python -m pip install -r requirements-37.txt
145+
# if python -V gives python 3.8
146+
python -m pip install -r requirements-38.txt
147+
# if python -V gives python 3.9
148+
python -m pip install -r requirements-39.txt
141149
```
142150

143151
Whenever rust code changes (your changes or via `git pull`):
@@ -154,16 +162,20 @@ To change test dependencies, change the `requirements.in` and run
154162

155163
```bash
156164
# install pip-tools (this can be done only once), also consider running in venv
157-
pip install pip-tools
165+
python -m pip install pip-tools
158166

159167
# change requirements.in and then run
160-
pip-compile --generate-hashes
168+
python -m piptools compile --generate-hashes -o requirements-37.txt
169+
# or run this is you are on python 3.8
170+
python -m piptools compile --generate-hashes -o requirements-38.txt
171+
# or run this is you are on python 3.9
172+
python -m piptools compile --generate-hashes -o requirements-39.txt
161173
```
162174

163-
To update dependencies, run
175+
To update dependencies, run with `-U`
164176

165177
```bash
166-
pip-compile update
178+
python -m piptools compile -U --generate-hashes -o requirements-39.txt
167179
```
168180

169181
More details [here](https://github.com/jazzband/pip-tools)

0 commit comments

Comments
 (0)