2015-12-03 09:13:53 +00:00
|
|
|
import sys
|
|
|
|
|
|
2020-06-07 14:43:21 +00:00
|
|
|
from setuptools import find_packages, setup
|
|
|
|
|
from setuptools.command.test import test as test_command
|
|
|
|
|
|
2015-12-03 09:13:53 +00:00
|
|
|
|
|
|
|
|
class Tox(test_command):
|
2021-12-08 08:48:45 +00:00
|
|
|
user_options = [("tox-args=", "a", "Arguments to pass to tox")]
|
2015-12-03 09:13:53 +00:00
|
|
|
|
|
|
|
|
def initialize_options(self):
|
|
|
|
|
test_command.initialize_options(self)
|
|
|
|
|
self.tox_args = None
|
|
|
|
|
|
|
|
|
|
def finalize_options(self):
|
|
|
|
|
test_command.finalize_options(self)
|
|
|
|
|
self.test_args = []
|
|
|
|
|
self.test_suite = True
|
|
|
|
|
|
|
|
|
|
def run_tests(self):
|
|
|
|
|
# import here, cause outside the eggs aren't loaded
|
|
|
|
|
import shlex
|
2020-06-07 14:43:21 +00:00
|
|
|
|
2021-12-08 08:48:45 +00:00
|
|
|
import tox
|
|
|
|
|
|
2015-12-03 09:13:53 +00:00
|
|
|
args = self.tox_args
|
|
|
|
|
if args:
|
|
|
|
|
args = shlex.split(self.tox_args)
|
|
|
|
|
errno = tox.cmdline(args=args)
|
|
|
|
|
sys.exit(errno)
|
|
|
|
|
|
2020-06-07 14:43:21 +00:00
|
|
|
|
2021-12-08 08:48:45 +00:00
|
|
|
with open("README.rst") as readme:
|
2018-05-18 08:57:13 +00:00
|
|
|
long_description = readme.read()
|
|
|
|
|
|
2011-06-16 09:25:15 +00:00
|
|
|
setup(
|
2021-12-08 08:48:45 +00:00
|
|
|
name="django-rosetta",
|
|
|
|
|
version=__import__("rosetta").get_version(limit=3),
|
|
|
|
|
description="A Django application that eases the translation of Django projects",
|
2018-05-18 08:57:13 +00:00
|
|
|
long_description=long_description,
|
2021-12-08 08:48:45 +00:00
|
|
|
author="Marco Bonetti",
|
|
|
|
|
author_email="mbonetti@gmail.com",
|
|
|
|
|
url="https://github.com/mbi/django-rosetta",
|
|
|
|
|
license="MIT",
|
|
|
|
|
packages=find_packages(exclude=["testproject", "testproject.*"]),
|
2011-06-16 09:25:15 +00:00
|
|
|
classifiers=[
|
2021-12-08 08:48:45 +00:00
|
|
|
"Development Status :: 4 - Beta",
|
|
|
|
|
"Environment :: Web Environment",
|
|
|
|
|
"Intended Audience :: Developers",
|
|
|
|
|
"License :: OSI Approved :: MIT License",
|
|
|
|
|
"Operating System :: OS Independent",
|
|
|
|
|
"Programming Language :: Python",
|
|
|
|
|
"Topic :: Software Development :: Localization",
|
|
|
|
|
"Topic :: Software Development :: Internationalization",
|
|
|
|
|
"Framework :: Django",
|
2023-12-04 15:48:07 +00:00
|
|
|
"Framework :: Django :: 4.2",
|
|
|
|
|
"Framework :: Django :: 5.0",
|
2021-12-08 08:48:45 +00:00
|
|
|
"Programming Language :: Python :: 3.9",
|
|
|
|
|
"Programming Language :: Python :: 3.10",
|
2023-12-04 15:48:07 +00:00
|
|
|
"Programming Language :: Python :: 3.11",
|
|
|
|
|
"Programming Language :: Python :: 3.12",
|
2011-06-16 09:25:15 +00:00
|
|
|
],
|
|
|
|
|
include_package_data=True,
|
2013-02-27 20:03:52 +00:00
|
|
|
zip_safe=False,
|
2023-12-04 15:48:07 +00:00
|
|
|
install_requires=["Django >= 4.2", "requests >= 2.30.0", "polib >= 1.1.0"],
|
2021-12-08 08:48:45 +00:00
|
|
|
tests_require=["tox", "vcrpy"],
|
|
|
|
|
cmdclass={"test": Tox},
|
2011-06-16 09:25:15 +00:00
|
|
|
)
|