Skip to content

Commit 1a63586

Browse files
authored
build: add missing files to PyPI distribution (v3.3.0) (#140)
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.
1 parent a36a8e6 commit 1a63586

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ coverage.xml
77
htmlcov
88
reports/*
99
.tox/*
10+
/dist
1011

1112
# Editor detritus
1213
*~

MANIFEST.in

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
include LICENSE.txt
2+
include README.rst
3+
include requirements/*
4+
include apparmor-profiles/*
5+
include sudoers-file/*

codejail/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""init"""
22

3-
__version__ = '3.2.0'
3+
__version__ = '3.3.0'

setup.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os
33
import re
44

5-
from setuptools import setup
5+
from setuptools import find_packages, setup
66

77
with open('README.rst') as readme:
88
long_description = readme.read()
@@ -36,7 +36,12 @@ def get_version(*file_paths):
3636
author='edX',
3737
author_email="[email protected]",
3838
url='https://github.com/openedx/codejail',
39-
packages=['codejail'],
39+
scripts=['proxy_main.py', 'memory_stress.py'],
40+
packages=find_packages(
41+
include=['codejail', 'codejail.*'],
42+
exclude=["*tests"],
43+
),
44+
include_package_data=True,
4045
install_requires=['six'],
4146
zip_safe=False,
4247
classifiers=[

0 commit comments

Comments
 (0)