From 9964315abe40a1d010d9c1aa20e261cd6ed69404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Tue, 2 Nov 2021 18:15:06 +0100 Subject: [PATCH] chore: get rid of tutor-openedx In the past, tutor was installed with "pip install tutor-openedx". For some time (since v12.0.2), "tutor" was installed as a dependency of "tutor-openedx". Now is the time to get rid of that old package. The standard way of installing tutor is now with "pip install tutor". --- .gitignore | 3 -- CHANGELOG-nightly.md | 1 + Makefile | 10 +--- tutor-openedx/MANIFEST.in | 0 tutor-openedx/README.rst | 3 -- tutor-openedx/setup.py | 64 -------------------------- tutor-openedx/tutoropenedx/__init__.py | 0 7 files changed, 3 insertions(+), 78 deletions(-) delete mode 100644 tutor-openedx/MANIFEST.in delete mode 100644 tutor-openedx/README.rst delete mode 100644 tutor-openedx/setup.py delete mode 100644 tutor-openedx/tutoropenedx/__init__.py diff --git a/.gitignore b/.gitignore index 347fc4d..8e55cc4 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,3 @@ __pycache__ /build/ /dist/ /release_description.md - -# Copied at build-time -/tutor-openedx/tutoropenedx/__about__.py diff --git a/CHANGELOG-nightly.md b/CHANGELOG-nightly.md index d6618d2..7a7077d 100644 --- a/CHANGELOG-nightly.md +++ b/CHANGELOG-nightly.md @@ -2,6 +2,7 @@ Note: Breaking changes between versions are indicated by "💥". +- 💥[Improvement] Get rid of the "tutor-openedx" package, which is no longer supported. - [Bugfix] Fix running Caddy container in k8s, which should always be the case even if `ENABLE_WEB_PROXY` is false. - 💥[Improvement] Run all services as unprivileged containers, for better security. This has multiple consequences: - The "openedx-dev" image is now built with `tutor dev dc build lms`. diff --git a/Makefile b/Makefile index 7709351..42eef3a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .DEFAULT_GOAL := help .PHONY: docs -SRC_DIRS = ./tutor ./tests ./bin ./tutor-openedx +SRC_DIRS = ./tutor ./tests ./bin BLACK_OPTS = --exclude templates ${SRC_DIRS} ###### Development @@ -18,18 +18,13 @@ upgrade-requirements: ## Upgrade requirements files pip-compile --upgrade requirements/dev.in pip-compile --upgrade requirements/docs.in -build-pythonpackage: build-pythonpackage-tutor build-pythonpackage-tutor-openedx ## Build python packages ready to upload to pypi +build-pythonpackage: build-pythonpackage-tutor ## Build python packages ready to upload to pypi build-pythonpackage-tutor: ## Build the "tutor" python package for upload to pypi python setup.py sdist -build-pythonpackage-tutor-openedx: ## Build the obsolete "tutor-openedx" python package for upload to pypi - cp tutor/__about__.py tutor-openedx/tutoropenedx/ - cd tutor-openedx && python setup.py sdist --dist-dir ../dist - push-pythonpackage: ## Push python package to pypi twine upload --skip-existing dist/tutor-$(shell make version).tar.gz - twine upload --skip-existing dist/tutor-openedx-$(shell make version).tar.gz test: test-lint test-unit test-types test-format test-pythonpackage ## Run all tests by decreasing order or priority @@ -47,7 +42,6 @@ test-types: ## Check type definitions test-pythonpackage: build-pythonpackage ## Test that package can be uploaded to pypi twine check dist/tutor-$(shell make version).tar.gz - twine check dist/tutor-openedx-$(shell make version).tar.gz format: ## Format code automatically black $(BLACK_OPTS) diff --git a/tutor-openedx/MANIFEST.in b/tutor-openedx/MANIFEST.in deleted file mode 100644 index e69de29..0000000 diff --git a/tutor-openedx/README.rst b/tutor-openedx/README.rst deleted file mode 100644 index 5d4014e..0000000 --- a/tutor-openedx/README.rst +++ /dev/null @@ -1,3 +0,0 @@ -WARNING: This project has moved to https://pypi.org/project/tutor/. You should now install Tutor with:: - - pip install tutor diff --git a/tutor-openedx/setup.py b/tutor-openedx/setup.py deleted file mode 100644 index c9cf051..0000000 --- a/tutor-openedx/setup.py +++ /dev/null @@ -1,64 +0,0 @@ -import io -import os -import sys -from setuptools import setup - -HERE = os.path.abspath(os.path.dirname(__file__)) - - -def load_readme(): - with io.open(os.path.join(HERE, "README.rst"), "rt", encoding="utf8") as f: - return f.read() - - -def load_about(): - about = {} - with io.open( - os.path.join(HERE, "tutoropenedx", "__about__.py"), "rt", encoding="utf-8" - ) as f: - exec(f.read(), about) # pylint: disable=exec-used - return about - - -ABOUT = load_about() - -setup( - name="tutor-openedx", - version=ABOUT["__version__"], - url="https://docs.tutor.overhang.io/", - project_urls={ - "Documentation": "https://docs.tutor.overhang.io/", - "Code": "https://github.com/overhangio/tutor", - "Issue tracker": "https://github.com/overhangio/tutor/issues", - "Community": "https://discuss.overhang.io", - }, - license="AGPLv3", - author="Overhang.io", - author_email="contact@overhang.io", - description="The Docker-based Open edX distribution designed for peace of mind", - long_description=load_readme(), - long_description_content_type="text/x-rst", - packages=["tutoropenedx"], - python_requires=">=3.5", - install_requires=["tutor=={}".format(ABOUT["__version__"])], - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "License :: OSI Approved :: GNU Affero General Public License v3", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - ], -) -sys.stderr.write( - """ -Installing Tutor from tutor-openedx is deprecated. You should instead install the "tutor" package with: - - pip install tutor -""" -) diff --git a/tutor-openedx/tutoropenedx/__init__.py b/tutor-openedx/tutoropenedx/__init__.py deleted file mode 100644 index e69de29..0000000