Convert to use CircleCI and run tests against Django 2.1/Python 3.7

This commit is contained in:
Swen Kooij
2019-01-11 14:37:03 +02:00
parent acf8867974
commit b2f50ec82b
13 changed files with 135 additions and 51 deletions

View File

@@ -1,13 +1,39 @@
import os
import distutils.cmd
import subprocess
from setuptools import find_packages, setup
class BaseCommand(distutils.cmd.Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def create_command(text, commands):
"""Creates a custom setup.py command."""
class CustomCommand(BaseCommand):
description = text
def run(self):
for cmd in commands:
subprocess.check_call(cmd)
return CustomCommand
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), encoding='utf-8') as readme:
README = readme.read()
setup(
name='django-localized-fields',
version='5.0a3',
version='5.0a5',
packages=find_packages(exclude=['tests']),
include_package_data=True,
license='MIT License',
@@ -18,7 +44,7 @@ setup(
author_email='open-source@sectorlabs.ro',
keywords=['django', 'localized', 'language', 'models', 'fields'],
install_requires=[
'django-postgres-extra>=1.21a11',
'django-postgres-extra>=1.21a14',
'Django>=1.11',
'deprecation==2.0.3'
],
@@ -32,5 +58,11 @@ setup(
'Programming Language :: Python :: 3.5',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
]
],
cmdclass={
'lint': create_command(
'Lints the code',
[['flake8', 'setup.py', 'localized_fields', 'tests']],
),
},
)