diff --git a/Dockerfile b/Dockerfile index 9e1b8109..e36faa30 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y build-essential libssl-dev libffi-dev p # Copy files to working directory RUN mkdir /code /code/polaris /code/data -COPY ./example ./setup.py ./README.rst ./MANIFEST.in /code/ +COPY ./example ./setup.py ./setup.cfg ./README.rst ./MANIFEST.in /code/ COPY ./polaris /code/polaris/ # Set fake environment variables so manage.py commands can run. diff --git a/MANIFEST.in b/MANIFEST.in index 700a7427..800ab80d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,9 +1,8 @@ include LICENSE -include README.md -include .env.example -include polaris/polaris/static/polaris/base.css -include polaris/polaris/static/polaris/company-icon.svg -include polaris/polaris/static/polaris/chevron-down.svg -recursive-include polaris/polaris/static/polaris/scripts * -recursive-include polaris/polaris/templates * -recursive-include polaris/polaris/locale * +include README.rst +graft polaris/polaris/static/polaris/scripts +graft polaris/polaris/templates +graft polaris/polaris/locale +graft polaris/polaris/static +global-exclude *.scss +global-exclude *.py[co] diff --git a/Pipfile b/Pipfile index c84199d8..1cb24860 100644 --- a/Pipfile +++ b/Pipfile @@ -20,6 +20,7 @@ libsass = "*" django-compressor = "*" django-sass-processor = "*" sphinx-autodoc-typehints = "*" +build = "*" [packages] django = ">=3.2, <4.0" diff --git a/Pipfile.lock b/Pipfile.lock index 5e3a6825..0862ba77 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "290a24e06b7458b8a90a5e2a81c6492b6cf7010a91f24b2685c0c1d03525d332" + "sha256": "a3cd300bad3af7a3df4271456fa9919f44bd286d1fd392ba78d631c31ec97165" }, "pipfile-spec": 6, "requires": { @@ -528,7 +528,7 @@ "sha256:000ca7f471a233c2251c6c7023ee85305721bfdf18621ebff4fd17a8653427ed", "sha256:0e7c33d9a63e7ddfcb86780aac87befc2fbddf46c58dbb487e0855f7ceec283c" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4.0'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", "version": "==1.26.8" }, "whitenoise": { @@ -658,6 +658,14 @@ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.9.1" }, + "build": { + "hashes": [ + "sha256:1aaadcd69338252ade4f7ec1265e1a19184bf916d84c9b7df095f423948cb89f", + "sha256:21b7ebbd1b22499c4dac536abc7606696ea4d909fd755e00f09f3c0f2c05e3c8" + ], + "index": "pypi", + "version": "==0.7.0" + }, "cached-property": { "hashes": [ "sha256:9fa5755838eecbb2d234c3aa390bd80fbd3ac6b6869109bfc1b499f7bd89a130", @@ -1416,7 +1424,7 @@ "sha256:000ca7f471a233c2251c6c7023ee85305721bfdf18621ebff4fd17a8653427ed", "sha256:0e7c33d9a63e7ddfcb86780aac87befc2fbddf46c58dbb487e0855f7ceec283c" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4.0'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", "version": "==1.26.8" }, "virtualenv": { diff --git a/docs/conf.py b/docs/conf.py index e29c4219..e050dd22 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,6 +22,7 @@ # Setup Django import django +from polaris import __version__ django.setup() @@ -33,9 +34,9 @@ author = "Stellar Development Foundation" # The short X.Y version -version = "2.2.0" +version = __version__ # The full version, including alpha/beta/rc tags -release = "2.2.0" +release = __version__ # -- General configuration --------------------------------------------------- diff --git a/polaris/.env.example b/polaris/.env.example index d40dccfe..061d8398 100644 --- a/polaris/.env.example +++ b/polaris/.env.example @@ -9,4 +9,4 @@ HORIZON_URI="https://horizon-testnet.stellar.org/" SERVER_JWT_KEY="secret" HOST_URL="https://example.com" SEP10_HOME_DOMAINS="example.com" -ENABLE_SEP_0023=True +ENABLE_SEP_0023=True \ No newline at end of file diff --git a/polaris/polaris/__init__.py b/polaris/polaris/__init__.py index e69de29b..8a124bf6 100644 --- a/polaris/polaris/__init__.py +++ b/polaris/polaris/__init__.py @@ -0,0 +1 @@ +__version__ = "2.2.0" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..7fd26b97 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" \ No newline at end of file diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..d4e103c2 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,65 @@ +[metadata] +name = django-polaris +version = attr: polaris.__version__ +description = An extendable Django server for Stellar Ecosystem Proposals. +long_description = file: README.rst +long_description_content_type = text/x-rst +url = django-polaris.readthedocs.io/en/stable +author = Stellar Development Foundation +author_email = jake@stellar.org +license = Apache license 2.0 +classifiers = + Environment :: Web Environment + Framework :: Django + Framework :: Django :: 3.2 + Intended Audience :: Developers + License :: OSI Approved :: Apache Software License + Operating System :: OS Independent + Programming Language :: Python + Programming Language :: Python :: 3 + Programming Language :: Python :: 3 :: Only + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 +project_urls = + Documentation = django-polaris.readthedocs.io/en/stable + Release notes = https://github.com/stellar/django-polaris/releases + Bug Tracker = https://github.com/stellar/django-polaris/issues +keywords = + stellar + sdf + anchor + server + polaris + sep-24 + sep24 + sep-31 + sep31 + +[options] +python_requires = >=3.7 +packages = find: +package_dir = + = polaris +include_package_data = true +install_requires = + django >=3.2, <4.0 + asgiref >=3.2, <4 + django-environ + django-model-utils <5.0, >=4.1 + djangorestframework >=3.12, <4.0 + whitenoise >=5.3, <6.0 + stellar-sdk >=6.0.1, <7.0.0 + aiohttp >=3.7, <4 + django-cors-headers >=3.7, <4.0 + toml + pyjwt <3.0, >=2.1 + cryptography >=3.4, <4.0 + sqlparse >=0.4.2 + + +[options.packages.find] +where = polaris +include = polaris, polaris.* +exclude = polaris.tests, polaris.tests.*, polaris.collectstatic diff --git a/setup.py b/setup.py index f3d04c5e..b024da80 100644 --- a/setup.py +++ b/setup.py @@ -1,57 +1,4 @@ -from setuptools import setup, find_packages +from setuptools import setup -with open("README.rst") as f: - long_description = f.read() - -setup( - name="django-polaris", - version="2.2.0", - description="An extendable Django server for Stellar Ecosystem Proposals", - long_description=long_description, - long_description_content_type="text/x-rst", - url="https://django-polaris.readthedocs.io/en/stable", - author="Jake Urban", - author_email="jake@stellar.org", - license="Apache license 2.0", - classifiers=[ - "Environment :: Web Environment", - "Framework :: Django", - "Framework :: Django :: 3.2", - "Intended Audience :: Developers", - "License :: OSI Approved :: Apache Software License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3.7", - ], - keywords=[ - "stellar", - "sdf", - "anchor", - "server", - "polaris", - "sep-24", - "sep24", - "sep-31", - "sep31", - ], - include_package_data=True, - package_dir={"": "polaris"}, - packages=find_packages("polaris"), - install_requires=[ - "django>=3.2,<4.0", - "asgiref>=3.2,<4", - "django-environ", - "django-model-utils<5.0,>=4.1", - "djangorestframework>=3.12,<4.0", - "whitenoise>=5.3,<6.0", - "stellar-sdk>=6.0.1,<7.0.0", - "aiohttp>=3.7,<4", - "django-cors-headers>=3.7,<4.0", - "toml", - "pyjwt<3.0,>=2.1", - "cryptography>=3.4,<4.0", - "sqlparse>=0.4.2", - ], - python_requires=">=3.7", -) +setup()