Skip to content

Commit

Permalink
Don't include runtests.py
Browse files Browse the repository at this point in the history
Deprecated upstream.

People who install from source can be expected to install py.test in
addition to the other dependencies, and the advantage is that this way
we can also require specific py.test plugins to be available.

--HG--
extra : amend_source : 2fda8664f64b9343f52e5b5c1867cef5262fe17b
  • Loading branch information
Nikratio committed Mar 10, 2016
1 parent 7f438e4 commit e1adc1f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 48 deletions.
5 changes: 5 additions & 0 deletions Changes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
UNRELEASED, S3QL tip

* The `runtests.py` file has been dropped in favor of requiring
installation of py.test.

2016-03-08, S3QL 2.17.1

* Fixed a bug in the upgrade procedure that prevented file system
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ include Changes.txt
include INSTALL.txt
include README.txt
include LICENSE
include runtests.py
exclude MANIFEST.in
prune tests/.cache
prune doc/doctrees
Expand Down
39 changes: 19 additions & 20 deletions rst/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,28 @@ that is not the case.
version between 1.0 (inclusive) and 2.0 (exclusive)
* `dugong <https://bitbucket.org/nikratio/python-dugong/>`_, any
version between 3.4 (inclusive) and 4.0 (exclusive)
* `pytest <http://pytest.org/>`_, version 2.3.3 or newer (optional, to run unit tests)
* `pytest-catchlog <https://github.com/eisensheng/pytest-catchlog>`_
(optional, to run unit tests)

To check if a specific module :var:`<module>` is installed, execute
:samp:`python3 -c 'import {<module>};
print({<module>}.__version__)'`. This will result in an
`ImportError` if the module is not installed, and will print the
installed version if the module is installed.


.. _inst-s3ql:

Installing S3QL
===============

To install S3QL itself, proceed as follows:
To build and install S3QL itself, proceed as follows:

1. Download S3QL from https://bitbucket.org/nikratio/s3ql/downloads
2. Unpack it into a folder of your choice
3. Run `python3 setup.py build_ext --inplace` to build S3QL.
4. Run `python3 runtests.py tests` to run a self-test. If this fails, ask
4. Run `python3 -m pytest tests/` to run a self-test. If this fails, ask
for help on the `mailing list
<http://groups.google.com/group/s3ql>`_ or report a bug in the
`issue tracker <https://bitbucket.org/nikratio/s3ql/issues>`_.
Expand All @@ -110,24 +114,21 @@ Mercurial repository, a bit more effort is required. You'll also need:

* Version 1.2b1 or newer of the Sphinx_ document processor.

* The `py.test`_ testing tool, version 2.3.3 or newer.

With these additional dependencies installed, S3QL can be build and
tested with ::

python3 setup.py build_cython
python3 setup.py build_ext --inplace
py.test tests/
python3 -m pytest tests/

Note that when building from the Mercurial repository, building and
testing is done with several additional checks. This may cause
Note that when building from the Mercurial or Git repository, building
and testing is done with several additional checks. This may cause
compilation and/or tests to fail even though there are no problems
with functionality. For example, when building from the Mercurial
repository, any use of functions that are scheduled for deprecation in
future Python version will cause tests to fail. If you would rather
just check for functionality, you can delete the :file:`MANIFEST.in`
file. In that case, the build system will behave as it does for a
regular release.
with functionality. For example, any use of functions that are
scheduled for deprecation in future Python version will cause tests to
fail. If you would rather just check for functionality, you can delete
the :file:`MANIFEST.in` file. In that case, the build system will
behave as it does for a regular release.

The HTML and PDF documentation can be generated with ::

Expand All @@ -141,12 +142,11 @@ and S3QL can be installed as usual with ::
Running tests requiring remote servers
======================================

By default, the `runtest.py` (or `py.test`) script skips all tests
that require connection to a remote storage backend. If you would like
to run these tests too (which is always a good idea), you have to
create additional entries in your `~/.s3ql/authinfo2` file that tell
S3QL what server and credentials to use for these tests. These entries
have the following form::
By default, tests requiring a connection to a remote storage backend
are skipped. If you would like to run these tests too (which is always
a good idea), you have to create additional entries in your
`~/.s3ql/authinfo2` file that tell S3QL what server and credentials to
use for these tests. These entries have the following form::

[<BACKEND>-test]
backend-login: <user>
Expand Down Expand Up @@ -177,4 +177,3 @@ being skipped by passing the :cmdopt:`-rs` argument to

.. _Cython: http://www.cython.org/
.. _Sphinx: http://sphinx.pocoo.org/
.. _py.test: http://pytest.org/
27 changes: 0 additions & 27 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ def main():
},
install_requires=required_pkgs,
cmdclass={'upload_docs': upload_docs,
'make_testscript': make_testscript,
'build_cython': build_cython,
'build_sphinx': build_docs },
command_options={ 'sdist': { 'formats': ('setup.py', 'bztar') } },
Expand Down Expand Up @@ -260,32 +259,6 @@ def run(self):
subprocess.check_call(['rsync', '-aHv', '--del', os.path.join(basedir, 'doc', 'manual.pdf'),
'ebox.rath.org:/srv/www.rath.org/s3ql-docs/'])

class make_testscript(setuptools.Command):
user_options = []
boolean_options = []
description = "Generate standalone py.test script"

def initialize_options(self):
pass

def finalize_options(self):
pass

def run(self):
import pytest
pytest.main(['--genscript', 'runtests.py'])

# Fixup shebang
with open('runtests.py.tmp', 'wb') as ofh, \
open('runtests.py', 'rb') as ifh:
ofh.write(b'#!/usr/bin/env python3\n')
ifh.readline()
shutil.copyfileobj(ifh, ofh)
os.rename('runtests.py.tmp', 'runtests.py')

# Make executable
os.chmod('runtests.py', 0o755)

def fix_docutils():
'''Work around https://bitbucket.org/birkenfeld/sphinx/issue/1154/'''

Expand Down

0 comments on commit e1adc1f

Please sign in to comment.