Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add how to setup tox with pyenv to contributing page #241 #251

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*~
.*.sw?
.coverage
htmlcov/
.directory
.env
.idea/*
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ envtest: clean
nosetests tests/

test:
coverage erase && nosetests -dsv --with-yanc --with-coverage --cover-package rows

test-tox:
tox

clean:
Expand Down
33 changes: 30 additions & 3 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,41 @@ tox -e py27
tox -e py35
```

*tox known issues* : running tox with py27 environ may raise InvocationError in
non Linux environments. To avoid it you may rebuild tox environment in every
run with `tox -e py27 -r` or if you want to run nosetests directly:
### Tox Known Issues

Running tox with py27 environ may raise InvocationError in non Linux
environments. To avoid it you may rebuild tox environment in every run with
`tox -e py27 -r` or if you want to run nosetests directly:

```bash
nosetests -dsv --with-yanc --with-coverage --cover-package rows tests/*.py
```

When running tox with pyenv, tox won't find any interpreters NOT in the global
path. Make sure all versions are activated with:

```bash
pyven global {python-version}
```

For instance, for allowing tox to find python 2.7, 3.5 and 3.6, you'll run:

```
pyenv global 2.7.13 3.6.1 3.5.3
```

Don't forget to add to this all other interpreters you already have enabled:
the `pyenv global` command will redefine the global interpreters, not append
to them!

**Important**: this will only work with regular virtualenvs. If you're using
`pyenv` to manage your virtualenvs, the global interpreters will not be
available when the virtualenv is active, and you won't be able to use tox.
Either create a standalone virtualenv, or just run the tests with nose, as
shown in the previous section.

### Creating Man Pages

To create the man page you'll need to install [txt2man][txt2man]. In Debian
(and Debian-based distributions) you can install by running:

Expand Down