Skip to content

Commit

Permalink
Switched to pytest-djangoapp.
Browse files Browse the repository at this point in the history
  • Loading branch information
idlesign committed Sep 14, 2018
1 parent 8862e2b commit 683a655
Show file tree
Hide file tree
Showing 18 changed files with 662 additions and 763 deletions.
17 changes: 10 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
language: python

sudo: false

python:
- 3.6
- 3.5
- 3.4
- 2.7

env:
- DJANGO="Django>=2.1,<2.2"
- DJANGO="Django>=2.0,<2.1"
- DJANGO="Django>=1.11,<1.12"
- DJANGO="Django>=1.10,<1.11"
- DJANGO="Django>=1.9,<1.10"
- DJANGO="Django>=1.8,<1.9"
- DJANGO="Django>=1.8.6,<1.9"
- DJANGO="Django>=1.7,<1.8"

install:
- pip install -U coverage coveralls django-etc $DJANGO

- pip install -U pytest pytest-djangoapp setuptools coverage coveralls $DJANGO

script: coverage run -a --source=sitegate sitegate/runtests.py
script: coverage run -a --source=sitegate setup.py test

matrix:

Expand All @@ -31,9 +29,14 @@ matrix:
- python: 3.5
env: DJANGO="Django>=1.7,<1.8"

- python: 3.4
env: DJANGO="Django>=2.1,<2.2"

- python: 2.7
env: DJANGO="Django>=2.0,<2.1"
env: DJANGO="Django>=2.1,<2.2"

- python: 2.7
env: DJANGO="Django>=2.0,<2.1"

after_success:
coveralls
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[aliases]
release = clean --all sdist bdist_wheel upload
test = pytest

[wheel]
universal = 1
40 changes: 32 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,52 @@
import io
import os
from setuptools import setup
from sitegate import VERSION
import re
import sys
from setuptools import setup, find_packages

PATH_BASE = os.path.dirname(__file__)


def read_file(fpath):
"""Reads a file within package directories."""
with io.open(os.path.join(PATH_BASE, fpath)) as f:
return f.read()


def get_version():
"""Returns version number, without module import (which can lead to ImportError
if some dependencies are unavailable before install."""
contents = read_file(os.path.join('sitegate', '__init__.py'))
version = re.search('VERSION = \(([^)]+)\)', contents)
version = version.group(1).replace(', ', '.').strip()
return version

f = open(os.path.join(os.path.dirname(__file__), 'README.rst'))
readme = f.read()
f.close()

setup(
name='django-sitegate',
version='.'.join(map(str, VERSION)),
version=get_version(),
url='http://github.com/idlesign/django-sitegate',

description='Reusable application for Django to ease sign up & sign in processes',
long_description=readme,
long_description=read_file('README.rst'),
license='BSD 3-Clause License',

author='Igor `idle sign` Starikov',
author_email='idlesign@yandex.ru',

packages=['sitegate'],
packages=find_packages(),
install_requires=['django-etc'],
setup_requires=[] + (['pytest-runner'] if 'test' in sys.argv else []),

include_package_data=True,
zip_safe=False,

test_suite='tests',
tests_require=[
'pytest',
'pytest-djangoapp>=0.10.0',
],

classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
Expand Down
69 changes: 0 additions & 69 deletions sitegate/runtests.py

This file was deleted.

Loading

0 comments on commit 683a655

Please sign in to comment.