From bc7868a85b24a2e188f6931000833619a9ffaabd Mon Sep 17 00:00:00 2001 From: lpm0073 Date: Tue, 11 Oct 2022 14:11:38 -0500 Subject: [PATCH] package for PyPi --- .pre-commit-config.yaml | 4 ---- README.rst | 8 ++++---- pyproject.toml | 9 +++++++-- release.sh | 14 ++++++++++++-- requirements/stable-psa.txt | 2 -- setup.py | 2 +- wp_oauth_backend/__about__.py | 2 +- 7 files changed, 25 insertions(+), 16 deletions(-) mode change 100644 => 100755 release.sh diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5edff18..859ac3d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,3 @@ repos: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace -- repo: https://github.com/psf/black - rev: 21.12b0 - hooks: - - id: black diff --git a/README.rst b/README.rst index dab2aa3..d493d61 100644 --- a/README.rst +++ b/README.rst @@ -104,11 +104,11 @@ add these settings to django.conf: 4. Configure a new Oauth2 client from the lms Django Admin console ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. image:: doc/django-admin-1.png +.. image:: https://raw.githubusercontent.com/lpm0073/wp-oauth-backend/main/doc/django-admin-1.png :width: 100% :alt: Open edX Django Admin Add Provider Configuration (OAuth) -.. image:: doc/django-admin-2.png +.. image:: https://raw.githubusercontent.com/lpm0073/wp-oauth-backend/main/doc/django-admin-2.png :width: 100% :alt: Open edX Django Admin Add Provider Configuration (OAuth) @@ -143,7 +143,7 @@ WP Oauth Plugin Configuration This plugin enables your Open edX installation to authenticate against the WP Oauth plugin provider in your Wordpress web site, configured as follows: -.. image:: doc/wp-oauth-config.png +.. image:: https://raw.githubusercontent.com/lpm0073/wp-oauth-backend/main/doc/wp-oauth-config.png :width: 100% :alt: WP Oauth configuration page @@ -164,7 +164,7 @@ add a snippet of this form to openedx_devops/.github/workflows/build-openedx.yml with: repository: wp-oauth-backend repository-organization: lpm0073 - repository-ref: v1.0.0 + repository-ref: v1.0.1 Sample lms log output diff --git a/pyproject.toml b/pyproject.toml index fd5ca8e..d36d8d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta:__legacy__" [project] name = "wp-oauth-backend_lpm0073" -version = "1.0.0" +version = "1.0.1" authors = [ { name="Lawrence McDaniel", email="lpm0073@gmail.com" }, ] @@ -16,7 +16,12 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ] +dependencies = [ + "social-auth-core==4.2.0", + "social-auth-app-django==5.0.0" +] +keywords = ["Wordpress", "OAuth", "Open edX"] [project.urls] "Homepage" = "https://github.com/lpm0073/wp-oauth-backend" -"Bug Tracker" = "https://github.com/lpm0073/wp-oauth-backend/issues" \ No newline at end of file +"Bug Tracker" = "https://github.com/lpm0073/wp-oauth-backend/issues" diff --git a/release.sh b/release.sh old mode 100644 new mode 100755 index f0b66a6..16857db --- a/release.sh +++ b/release.sh @@ -6,11 +6,21 @@ # date: oct-2022 # # usage: a work in progress. build package and upload to PyPi. +# https://pypi.org/project/wp-oauth-backend/ +# https://pypi.org/project/wp-oauth-backend-lpm0073/ +# +# see: https://www.freecodecamp.org/news/how-to-create-and-upload-your-first-python-package-to-pypi/ #------------------------------------------------------------------------------ python -m pip install --upgrade build -python3 -m build --sdist ./ +python3 -m build --sdist ./ python3 -m build --wheel ./ python3 -m pip install --upgrade twine -python3 -m twine upload --repository testpypi dist/* +twine check dist/* + +# PyPi test +twine upload --repository testpypi dist/* + +# PyPi +twine upload dist/* diff --git a/requirements/stable-psa.txt b/requirements/stable-psa.txt index 48eb05f..8e69a48 100644 --- a/requirements/stable-psa.txt +++ b/requirements/stable-psa.txt @@ -1,5 +1,3 @@ # Stable Python Social Auth, found in Open edX Nutmeg social-auth-app-django==5.0.0 social-auth-core==4.2.0 -twine -build diff --git a/setup.py b/setup.py index ba48d8b..1f19fa3 100644 --- a/setup.py +++ b/setup.py @@ -84,7 +84,7 @@ setup( include_package_data=True, package_data={"": ["*.html"]}, # include any templates found in this repo. zip_safe=False, - keywords="WP OAuth", + keywords="Wordpress, oauth, Open edX", python_requires=">=3.7", install_requires=load_requirements("requirements/stable-psa.txt"), classifiers=[ diff --git a/wp_oauth_backend/__about__.py b/wp_oauth_backend/__about__.py index 5becc17..5c4105c 100644 --- a/wp_oauth_backend/__about__.py +++ b/wp_oauth_backend/__about__.py @@ -1 +1 @@ -__version__ = "1.0.0" +__version__ = "1.0.1"