mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-12-13 23:32:24 +03:00
Convert to use CircleCI and run tests against Django 2.1/Python 3.7
This commit is contained in:
38
setup.py
38
setup.py
@@ -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']],
|
||||
),
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user