[fix] move version from __init__ to avoid install conflict when django is not yet installed
parent
e51fba45f8
commit
ad3b0af66a
|
|
@ -1,9 +1,11 @@
|
|||
VERSION = (1, 3)
|
||||
__version__ = ".".join(map(str, VERSION))
|
||||
|
||||
|
||||
from .filters import (
|
||||
MultiSelectFilter, MultiSelectRelatedFilter, MultiSelectRelatedOnlyFilter,
|
||||
MultiSelectDropdownFilter, MultiSelectRelatedDropdownFilter, DropdownFilter,
|
||||
ChoicesDropdownFilter, RelatedDropdownFilter, BooleanAnnotationFilter
|
||||
MultiSelectFilter,
|
||||
MultiSelectRelatedFilter,
|
||||
MultiSelectRelatedOnlyFilter,
|
||||
MultiSelectDropdownFilter,
|
||||
MultiSelectRelatedDropdownFilter,
|
||||
DropdownFilter,
|
||||
ChoicesDropdownFilter,
|
||||
RelatedDropdownFilter,
|
||||
BooleanAnnotationFilter,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
"""
|
||||
This project uses the Semantic Versioning scheme in conjunction with PEP 0440:
|
||||
<http://semver.org/>
|
||||
<https://www.python.org/dev/peps/pep-0440>
|
||||
|
||||
Major versions introduce significant changes to the API, and backwards
|
||||
compatibility is not guaranteed. Minor versions are for new features and other
|
||||
backwards-compatible changes to the API. Patch versions are for bug fixes and
|
||||
internal code changes that do not affect the API. Development versions are
|
||||
incomplete states of a release .
|
||||
|
||||
Version 0.x should be considered a development version with an unstable API,
|
||||
and backwards compatibility is not guaranteed for minor versions.
|
||||
"""
|
||||
|
||||
__version__ = "1.3"
|
||||
22
setup.py
22
setup.py
|
|
@ -3,6 +3,15 @@
|
|||
import os
|
||||
from setuptools import setup
|
||||
from setuptools import find_packages
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def version():
|
||||
"""Get the local package version."""
|
||||
namespace = {}
|
||||
path = Path("more_admin_filters", "__version__.py")
|
||||
exec(path.read_text(), namespace)
|
||||
return namespace["__version__"]
|
||||
|
||||
|
||||
def read(filename):
|
||||
|
|
@ -11,18 +20,17 @@ def read(filename):
|
|||
return file.read()
|
||||
|
||||
|
||||
version = __import__("more_admin_filters").__version__
|
||||
if '-dev' in version:
|
||||
dev_status = 'Development Status :: 3 - Alpha'
|
||||
elif '-beta' in version:
|
||||
dev_status = 'Development Status :: 4 - Beta'
|
||||
if "-dev" in version:
|
||||
dev_status = "Development Status :: 3 - Alpha"
|
||||
elif "-beta" in version:
|
||||
dev_status = "Development Status :: 4 - Beta"
|
||||
else:
|
||||
dev_status = 'Development Status :: 5 - Production/Stable'
|
||||
dev_status = "Development Status :: 5 - Production/Stable"
|
||||
|
||||
|
||||
setup(
|
||||
name="django-more-admin-filters",
|
||||
version=version,
|
||||
version=version(),
|
||||
description="Additional filters for django-admin.",
|
||||
long_description=read("README.rst"),
|
||||
author="Thomas Leichtfuß",
|
||||
|
|
|
|||
Loading…
Reference in New Issue