Skip to content

Commit

Permalink
build: add missing files to PyPI distribution (v3.3.0) (#140)
Browse files Browse the repository at this point in the history
The existing PyPI distribution (edx-codejail 3.2.0) was
missing several files that made it unsuitable for installation
by edx-platform:

* It was missing root scripts: proxy_main.py and memory_stress.py.
* It was missing the apparmor-profiles and sudoers-files directories.
* It wasn't missing any Python modules under codejail, but *if* any
  sub-packages had been added to codejail, they would have been
  omitted from the distribution. This could have bitten someone in the future.

To fix, we modify setup.py and add a MANIFEST.in, in line with the
pattern established by the cookiecutter repo:

https://github.com/openedx/edx-cookiecutters/blob/master/python-template/%7B%7Bcookiecutter.placeholder_repo_name%7D%7D/setup.py

This wasn't affecting edx-platform because edx-platform currently
does a GitHub-based editable installation (`-e git+https://...`) for
codejail. However, we'd like to move away from those editable
installations as a they are slow and cannot be kept up-to-date
with `make upgrade`.

Bump from 3.2.0 to 3.3.0.
  • Loading branch information
kdmccormick authored Oct 5, 2022
1 parent a36a8e6 commit 1a63586
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ coverage.xml
htmlcov
reports/*
.tox/*
/dist

# Editor detritus
*~
Expand Down
5 changes: 5 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include LICENSE.txt
include README.rst
include requirements/*
include apparmor-profiles/*
include sudoers-file/*
2 changes: 1 addition & 1 deletion codejail/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""init"""

__version__ = '3.2.0'
__version__ = '3.3.0'
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import re

from setuptools import setup
from setuptools import find_packages, setup

with open('README.rst') as readme:
long_description = readme.read()
Expand Down Expand Up @@ -36,7 +36,12 @@ def get_version(*file_paths):
author='edX',
author_email="[email protected]",
url='https://github.com/openedx/codejail',
packages=['codejail'],
scripts=['proxy_main.py', 'memory_stress.py'],
packages=find_packages(
include=['codejail', 'codejail.*'],
exclude=["*tests"],
),
include_package_data=True,
install_requires=['six'],
zip_safe=False,
classifiers=[
Expand Down

0 comments on commit 1a63586

Please sign in to comment.