Skip to content

Commit fbdfa0a

Browse files
committed
Refresh the development enviroment
When using Python 3.9, setting up the development environment croaked. Because "bootstrap.py" was a workaround in pre-pip times, this patch completely gets rid of it. At the same time, it modernizes some more dependency definitions.
1 parent 3fa42ca commit fbdfa0a

File tree

8 files changed

+46
-320
lines changed

8 files changed

+46
-320
lines changed

.github/workflows/main.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ jobs:
3434
- name: Install dependencies
3535
run: |
3636
python -m pip install --upgrade pip
37-
python bootstrap.py
37+
38+
# Workaround needed for Python 3.5
39+
python -m pip install --upgrade "setuptools>=31,<51"
40+
41+
pip install zc.buildout==2.13.4
3842
3943
# replace SQLAlchemy version
4044
sed -ir 's/SQLAlchemy.*/SQLAlchemy = ${{ matrix.sqla-version }}/g' versions.cfg
@@ -48,7 +52,7 @@ jobs:
4852
sed -ir 's/crate_server.*/crate_server = ${{ matrix.crate-version }}/g' versions.cfg
4953
fi
5054
51-
bin/buildout -n -c base.cfg
55+
buildout -n -c base.cfg
5256
5357
- name: Test
5458
run: |

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
.coverage/
1+
.venv*
2+
.coverage
23
.idea/
34
.installed.cfg
45
.tox/

DEVELOP.rst

+11-9
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,36 @@ Setup
77

88
This project uses buildout_ to set up the development environment.
99

10-
To start things off, run::
10+
To start things off, create a Python virtualenv and install buildout::
1111

12-
$ python bootstrap.py
12+
python3 -m venv .venv
13+
source .venv/bin/activate
14+
pip install zc.buildout==2.13.4
1315

1416
Then, run::
1517

16-
$ ./bin/buildout -N
18+
buildout -N
1719

1820
Running Tests
1921
=============
2022

2123
The tests are run using the zope.testrunner_::
2224

23-
$ ./bin/test
25+
./bin/test
2426

25-
This will run all tests using the Python interpreter that was used to
26-
bootstrap buildout.
27+
This will run all tests using the Python interpreter that was used when
28+
creating the Python virtualenv.
2729

2830
You can run the tests against multiple Python interpreters with tox_::
2931

30-
$ ./bin/tox
32+
./bin/tox
3133

3234
To do this, you will need ``python2.7``, ``python3.3``, and ``pypy`` on your
3335
``$PATH``.
3436

3537
To run against a single interpreter, you can also do::
3638

37-
$ ./bin/tox -e py33
39+
./bin/tox -e py37
3840

3941
*Note*: before running tests make sure to stop all CrateDB instances which
4042
listening on the default CrateDB transport port to avoid side effects with the
@@ -90,7 +92,7 @@ The docs are written written with ReStructuredText_ and processed with Sphinx_.
9092

9193
Build the docs by running::
9294

93-
$ bin/sphinx
95+
./bin/sphinx
9496

9597
The output can then be found in the ``out/html`` directory.
9698

LICENSE

-55
Original file line numberDiff line numberDiff line change
@@ -203,61 +203,6 @@
203203
limitations under the License.
204204

205205

206-
===============================================================================
207-
208-
For the `bootstrap.py` file:
209-
210-
Buildout <http://www.buildout.org/>
211-
212-
Copyright (c) 2006 Zope Foundation and Contributors.
213-
All Rights Reserved.
214-
215-
Zope Public License (ZPL) Version 2.1
216-
217-
A copyright notice accompanies this license document that identifies the
218-
copyright holders.
219-
220-
This license has been certified as open source. It has also been designated as
221-
GPL compatible by the Free Software Foundation (FSF).
222-
223-
Redistribution and use in source and binary forms, with or without
224-
modification, are permitted provided that the following conditions are met:
225-
226-
1. Redistributions in source code must retain the accompanying copyright
227-
notice, this list of conditions, and the following disclaimer.
228-
229-
2. Redistributions in binary form must reproduce the accompanying copyright
230-
notice, this list of conditions, and the following disclaimer in the
231-
documentation and/or other materials provided with the distribution.
232-
233-
3. Names of the copyright holders must not be used to endorse or promote
234-
products derived from this software without prior written permission from the
235-
copyright holders.
236-
237-
4. The right to distribute this software or to use it for any purpose does not
238-
give you the right to use Servicemarks (sm) or Trademarks (tm) of the
239-
copyright
240-
holders. Use of them is covered by separate agreement with the copyright
241-
holders.
242-
243-
5. If any files are modified, you must cause the modified files to carry
244-
prominent notices stating that you changed the files and the date of any
245-
change.
246-
247-
Disclaimer
248-
249-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
250-
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
251-
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
252-
EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
253-
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
254-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
255-
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
256-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
257-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
258-
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
259-
260-
261206
===============================================================================
262207

263208
For the `docs` directory:

bootstrap.py

-210
This file was deleted.

docs/requirements.txt

+1-14
Original file line numberDiff line numberDiff line change
@@ -1,14 +1 @@
1-
# don't pin crate version numbers so the latest will always be pulled when you
2-
# set up your environment from scratch
3-
4-
crate-docs-theme>=0.7
5-
6-
# packages for local dev
7-
8-
sphinx-autobuild==0.6.0
9-
10-
# the next section should mirror the RTD environment
11-
12-
alabaster>=0.7,<0.8,!=0.7.5
13-
setuptools<41
14-
sphinx==1.8.5
1+
crate-docs-theme

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py{py,34,35,36,37,38}-sa_{1_0,1_1,1_2,1_3}
2+
envlist = py{py3,35,36,37,38,39}-sa_{1_0,1_1,1_2,1_3}
33

44
[testenv]
55
usedevelop = True

0 commit comments

Comments
 (0)