Skip to content

Commit

Permalink
Merge pull request #61 from eduNEXT/eric/oep-18
Browse files Browse the repository at this point in the history
[BD-6] OEP-18 Compliance
  • Loading branch information
awais786 authored Jul 1, 2020
2 parents f648034 + bfbec8b commit d1c468d
Show file tree
Hide file tree
Showing 11 changed files with 137 additions and 15 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade:
pip install -q -r requirements/pip_tools.txt
pip-compile --upgrade -o requirements/pip_tools.txt requirements/pip_tools.in
pip-compile --upgrade -o requirements/base.txt requirements/base.in
pip-compile --upgrade -o requirements/docs.txt requirements/docs.in
1 change: 1 addition & 0 deletions openedx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ tags:
- library
oeps:
oep-7: True
oep-18: True
7 changes: 0 additions & 7 deletions requirements.txt

This file was deleted.

10 changes: 10 additions & 0 deletions requirements/base.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Core requirements for using this package
-c constraints.txt

bleach # Use for sanitizing HTML content in wiki articles
django
django-mptt
django-sekizai
Markdown
six # Use for strings and unicode compatibility
sorl-thumbnail # Required by wiki.plugins.images
20 changes: 20 additions & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# make upgrade
#
bleach==3.1.5 # via -r requirements/base.in
django-classy-tags==1.0.0 # via django-sekizai
django-js-asset==1.2.2 # via django-mptt
django-mptt==0.11.0 # via -r requirements/base.in
django-sekizai==1.1.0 # via -r requirements/base.in
django==2.2.13 # via -c requirements/constraints.txt, -r requirements/base.in, django-classy-tags, django-mptt, django-sekizai
markdown==2.6.11 # via -c requirements/constraints.txt, -r requirements/base.in
packaging==20.4 # via bleach
pyparsing==2.4.7 # via packaging
pytz==2020.1 # via django
six==1.15.0 # via -r requirements/base.in, bleach, django-classy-tags, django-sekizai, packaging
sorl-thumbnail==12.6.3 # via -r requirements/base.in
sqlparse==0.3.1 # via django
webencodings==0.5.1 # via bleach
17 changes: 17 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Version constraints for pip-installation.
#
# This file doesn't install any packages. It specifies version constraints
# that will be applied if a package is needed.
#
# When pinning something here, please provide an explanation of why. Ideally,
# link to other information that will help people in the future to remove the
# pin when possible. Writing an issue against the offending project and
# linking to it here is good.

# TODO: Many pinned dependencies should be unpinned and/or moved to this constraints file.

# Use latest Django LTS version
Django<2.3.0

# Use version 2.6 to avoid markdown errors
Markdown<2.7
5 changes: 5 additions & 0 deletions requirements/docs.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Used by doc builds (like for edx.readthedocs.io)
-c constraints.txt

edx-sphinx-theme
Sphinx
34 changes: 34 additions & 0 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# make upgrade
#
alabaster==0.7.12 # via sphinx
babel==2.8.0 # via sphinx
certifi==2020.6.20 # via requests
chardet==3.0.4 # via requests
docutils==0.16 # via sphinx
edx-sphinx-theme==1.5.0 # via -r requirements/docs.in
idna==2.10 # via requests
imagesize==1.2.0 # via sphinx
jinja2==2.11.2 # via sphinx
markupsafe==1.1.1 # via jinja2
packaging==20.4 # via sphinx
pygments==2.6.1 # via sphinx
pyparsing==2.4.7 # via packaging
pytz==2020.1 # via babel
requests==2.24.0 # via sphinx
six==1.15.0 # via edx-sphinx-theme, packaging
snowballstemmer==2.0.0 # via sphinx
sphinx==3.1.1 # via -r requirements/docs.in, edx-sphinx-theme
sphinxcontrib-applehelp==1.0.2 # via sphinx
sphinxcontrib-devhelp==1.0.2 # via sphinx
sphinxcontrib-htmlhelp==1.0.3 # via sphinx
sphinxcontrib-jsmath==1.0.1 # via sphinx
sphinxcontrib-qthelp==1.0.3 # via sphinx
sphinxcontrib-serializinghtml==1.1.4 # via sphinx
urllib3==1.25.9 # via requests

# The following packages are considered to be unsafe in a requirements file:
# setuptools
3 changes: 3 additions & 0 deletions requirements/pip_tools.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Dependencies to run compile tools
-c constraints.txt
pip-tools # Contains pip-compile, used to generate pip requirements files
12 changes: 12 additions & 0 deletions requirements/pip_tools.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# make upgrade
#
click==7.1.2 # via pip-tools
pip-tools==5.2.1 # via -r requirements/pip_tools.in
six==1.15.0 # via pip-tools

# The following packages are considered to be unsafe in a requirements file:
# pip
37 changes: 29 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,29 @@ def build_media_pattern(base_folder, file_extension):
return ["%s/%s*.%s" % (base_folder, "*/"*x, file_extension) for x in range(10)]


def load_requirements(*requirements_paths):
"""
Load all requirements from the specified requirements files.
Returns a list of requirement strings.
"""
requirements = set()
for path in requirements_paths:
with open(path) as reqs:
requirements.update(
line.split('#')[0].strip() for line in reqs
if is_requirement(line.strip())
)
return list(requirements)


def is_requirement(line):
"""
Return True if the requirement line is a package requirement;
that is, it is not blank, a comment, a URL, or an included file.
"""
return line and not line.startswith(('-r', '#', '-e', 'git+', '-c'))


template_patterns = (
build_media_pattern("templates", "html") +
build_media_pattern("static", "js") +
Expand All @@ -38,22 +61,17 @@ def build_media_pattern(base_folder, file_extension):
)

setup(
name = "django-wiki",
name="django-wiki",
version="0.0.27",
author="Benjamin Bach",
author_email="[email protected]",
description=("A wiki system written for the Django framework."),
license="GPLv3",
keywords="django wiki markdown",
packages=find_packages(exclude=["testproject","testproject.*"]),
packages=find_packages(exclude=["testproject", "testproject.*"]),
long_description=read('README.md'),
zip_safe=False,
install_requires=[
'Django<3.0',
'markdown',
'django-sekizai',
'django-mptt',
],
install_requires=load_requirements('requirements/base.in'),
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'License :: OSI Approved :: GPLv3',
Expand All @@ -65,6 +83,9 @@ def build_media_pattern(base_folder, file_extension):
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.8',
'Framework :: Django',
'Framework :: Django :: 2.2',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries :: Application Frameworks',
Expand Down

0 comments on commit d1c468d

Please sign in to comment.