Files
Django-Translatable-Fields/django_translatable_fields/setup.py

109 lines
3.4 KiB
Python
Raw Normal View History

2025-08-02 20:08:33 +02:00
# -*- coding: utf-8 -*-
"""
Setup script for Django Translatable Fields
This package requires PostgreSQL as it relies on native JSON field operations
for optimal search performance and data integrity.
Author: Holger Sielaff <holger@backender.de>
Version: 0.1.0
"""
from setuptools import setup, find_packages
import os
# Read the README file for long description
def read_readme():
"""Read README.md file for package description"""
readme_path = os.path.join(os.path.dirname(__file__), 'README.md')
if os.path.exists(readme_path):
with open(readme_path, 'r', encoding='utf-8') as f:
return f.read()
return "Django Translatable Fields - Odoo-style translatable fields for Django"
setup(
name='django-translatable-fields',
version='0.1.0',
description='Django fields with Odoo-style translate=True functionality',
long_description=read_readme(),
long_description_content_type='text/markdown',
author='Holger Sielaff',
author_email='holger@backender.de',
url='https://github.com/holger/django-translatable-fields', # Update with actual repo
packages=find_packages(),
include_package_data=True,
# Package requirements
install_requires=[
'Django>=4.2,<6.0',
'psycopg2-binary>=2.9.0', # PostgreSQL adapter
],
# Extra requirements for development
extras_require={
'dev': [
'pytest>=7.0.0',
'pytest-django>=4.5.0',
'black>=22.0.0',
'flake8>=4.0.0',
'mypy>=0.991',
],
'postgres': [
'psycopg2-binary>=2.9.0',
],
},
# Python version requirement
python_requires='>=3.8',
# Package classifiers
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Django :: 4.2',
'Framework :: Django :: 5.0',
'Framework :: Django :: 5.1',
'Framework :: Django :: 5.2',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Database',
'Topic :: Text Processing :: Linguistic',
],
# Package keywords
keywords='django, translation, i18n, l10n, fields, postgresql, json, odoo',
# Entry points
entry_points={
'console_scripts': [
'translatable-migrate=django_translatable_fields.management.commands.makemigrations_translatable:main',
],
},
# Package data
package_data={
'django_translatable_fields': [
'static/django_translatable_fields/css/*.css',
'static/django_translatable_fields/js/*.js',
'templates/django_translatable_fields/*.html',
'locale/*/LC_MESSAGES/*.po',
'locale/*/LC_MESSAGES/*.mo',
],
},
# Zip safe
zip_safe=False,
)