Commit f3cbd1cb authored by Sybren A. Stüvel's avatar Sybren A. Stüvel

Fix #1: Moved from Pipenv to Poetry for dependency management

The `setup.py` was removed because it's generated by Poetry when
necessary.

The `pyproject.toml` file contains the minimal versions of the
dependencies, which are set to the current release versions. This code
may be compatible with older versions as well, but that hasn't been
tested. IMO it's a good idea to have explicit minimal versions in this
file (compared to using "*" as we did before).
parent 7ebeb3b7
......@@ -9,3 +9,4 @@ db.sqlite3
/dist/
/blender_id_oauth_client.egg-info/
/blender-id-oauth-client.db
/poetry.lock
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
Django = "*"
requests-oauthlib = "*"
[dev-packages]
mysqlclient = "*"
pytest = "*"
pytest-cov = "*"
pytest-django = "*"
mypy = "*"
twine = "*"
responses = "*"
[requires]
python_version = "3.6"
This diff is collapsed.
# Releasing new versions
- Run `update_version.sh 1.0`, commit, and push (including tags).
- Run `pipenv run py.test` to run the tests one final time.
- Run `pipenv run ./setup.py sdist bdist_wheel` to create distribution files.
- Use [Twine](https://twine.readthedocs.io/en/latest/) to upload them,
first as test, then for real. Note that test.pypi.org requires separate registration::
pipenv run twine upload --repository-url https://test.pypi.org/legacy/ dist/*
pipenv run twine upload dist/*
- Run `poetry run py.test` to run the tests one final time.
- Run `poetry build` to create distribution files.
- Run `poetry publish` to publish the distribution files to Pypi.
[tool.poetry]
name = "blender-id-oauth-client"
version = "0.8"
homepage = "https://gitlab.com/blender-institute/blender-id-oauth-client"
description = "Django app for using Blender ID as OAuth2 authentication service."
authors = ["Sybren A. Stüvel <sybren@blender.studio>"]
license = "GPL-2.0"
classifiers=[
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 2.1",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Topic :: Internet :: WWW/HTTP",
]
[tool.poetry.dependencies]
python = "^3.6"
Django = "^2.1"
requests-oauthlib = "^1.0"
[tool.poetry.dev-dependencies]
mysqlclient = "^1.3"
pytest = "^3.8"
pytest-cov = "^2.6"
pytest-django = "^3.4"
mypy = "*"
responses = "^0.9"
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
#!/usr/bin/env python3
import os
import pathlib
from setuptools import find_packages, setup
MY_DIR = pathlib.Path(__file__).absolute().parent
with open(MY_DIR / 'README.rst') as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(MY_DIR)
setup(
name='blender-id-oauth-client',
version='0.8',
packages=find_packages(exclude=('tests.*', 'tests', 'example')),
python_requires=">=3.6",
install_requires=[
'Django>=2.1',
],
zip_safe=True,
include_package_data=True,
license='GNU General Public License v2 (GPLv2)',
description='A Django app to authenticate against Blender ID.',
long_description=README,
url='https://gitlab.com/blender-institute/blender-id-oauth-client',
author='Sybren A. Stüvel',
author_email='sybren@blender.studio',
classifiers=[
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Django :: 2.1',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
)
......@@ -7,9 +7,7 @@ if [ -z "$VERSION" ]; then
exit 1
fi
BL_INFO_VER=$(echo "$VERSION" | sed 's/\./, /g')
sed "s/version='[^']*'/version='$VERSION'/" -i setup.py
poetry version $VERSION
git diff
echo
......@@ -18,5 +16,5 @@ echo git commit -m \'Bumped version to $VERSION\' setup.py
echo git tag -a version-$VERSION -m \'Tagged version $VERSION\'
echo
echo "Build the package & upload to PyPi using:"
echo pipenv run ./setup.py sdist bdist_wheel
echo "pipenv run twine upload dist/blender*id*oauth*client*${VERSION}*"
echo poetry build
echo poetry publish
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment