Skip to content

Commit

Permalink
Refresh the development enviroment
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
amotl committed Mar 15, 2021
1 parent 3fa42ca commit b353753
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 321 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python bootstrap.py
# Workaround needed for Python 3.5
python -m pip install --upgrade "setuptools>=31,<51"
pip install zc.buildout==2.13.4
# replace SQLAlchemy version
sed -ir 's/SQLAlchemy.*/SQLAlchemy = ${{ matrix.sqla-version }}/g' versions.cfg
Expand All @@ -48,7 +52,7 @@ jobs:
sed -ir 's/crate_server.*/crate_server = ${{ matrix.crate-version }}/g' versions.cfg
fi
bin/buildout -n -c base.cfg
buildout -n -c base.cfg
- name: Test
run: |
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.coverage/
.venv*
.coverage
.idea/
.installed.cfg
.tox/
Expand Down
20 changes: 11 additions & 9 deletions DEVELOP.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,36 @@ Setup

This project uses buildout_ to set up the development environment.

To start things off, run::
To start things off, create a Python virtualenv and install buildout::

$ python bootstrap.py
python3 -m venv .venv
source .venv/bin/activate
pip install zc.buildout==2.13.4

Then, run::

$ ./bin/buildout -N
buildout -N

Running Tests
=============

The tests are run using the zope.testrunner_::

$ ./bin/test
./bin/test

This will run all tests using the Python interpreter that was used to
bootstrap buildout.
This will run all tests using the Python interpreter that was used when
creating the Python virtualenv.

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

$ ./bin/tox
./bin/tox

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

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

$ ./bin/tox -e py33
./bin/tox -e py37

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

Build the docs by running::

$ bin/sphinx
./bin/sphinx

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

Expand Down
55 changes: 0 additions & 55 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -203,61 +203,6 @@
limitations under the License.


===============================================================================

For the `bootstrap.py` file:

Buildout <http://www.buildout.org/>

Copyright (c) 2006 Zope Foundation and Contributors.
All Rights Reserved.

Zope Public License (ZPL) Version 2.1

A copyright notice accompanies this license document that identifies the
copyright holders.

This license has been certified as open source. It has also been designated as
GPL compatible by the Free Software Foundation (FSF).

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions in source code must retain the accompanying copyright
notice, this list of conditions, and the following disclaimer.

2. Redistributions in binary form must reproduce the accompanying copyright
notice, this list of conditions, and the following disclaimer in the
documentation and/or other materials provided with the distribution.

3. Names of the copyright holders must not be used to endorse or promote
products derived from this software without prior written permission from the
copyright holders.

4. The right to distribute this software or to use it for any purpose does not
give you the right to use Servicemarks (sm) or Trademarks (tm) of the
copyright
holders. Use of them is covered by separate agreement with the copyright
holders.

5. If any files are modified, you must cause the modified files to carry
prominent notices stating that you changed the files and the date of any
change.

Disclaimer

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


===============================================================================

For the `docs` directory:
Expand Down
210 changes: 0 additions & 210 deletions bootstrap.py

This file was deleted.

15 changes: 1 addition & 14 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# don't pin crate version numbers so the latest will always be pulled when you
# set up your environment from scratch

crate-docs-theme>=0.7

# packages for local dev

sphinx-autobuild==0.6.0

# the next section should mirror the RTD environment

alabaster>=0.7,<0.8,!=0.7.5
setuptools<41
sphinx==1.8.5
crate-docs-theme
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{py,34,35,36,37,38}-sa_{1_0,1_1,1_2,1_3}
envlist = py{py3,35,36,37,38,39}-sa_{1_0,1_1,1_2,1_3}

[testenv]
usedevelop = True
Expand Down
Loading

0 comments on commit b353753

Please sign in to comment.