Skip to content
This repository was archived by the owner on Jan 12, 2022. It is now read-only.

Commit 7215370

Browse files
committed
Merge pull request #10 from andrewsg/namespace_packages
Add setup.py and manifest so the runtime can be installed as a package
2 parents 2dad98c + 4c9799b commit 7215370

6 files changed

Lines changed: 45 additions & 36 deletions

File tree

MANIFEST.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
graft python_vm_runtime
2+
3+
include README
4+
include LICENSE
5+
6+
global-exclude *.py[co] __pycache__ *.so *.pyd

multicore_runtime/__init__.py

Whitespace-only changes.

multicore_runtime/base_requirements.txt

Lines changed: 0 additions & 19 deletions
This file was deleted.

multicore_runtime/dev/Dockerfile

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
1-
# Base Dockerfile for all AppEngine runtime implementations.
2-
FROM google/debian:wheezy
3-
# Clean any CMD that might be inherited from previous image, because that
4-
# will pollute our ENTRYPOINT, see
5-
# http://docs.docker.io/en/latest/reference/builder/#entrypoint.
6-
CMD []
7-
ENV DEBIAN_FRONTEND noninteractive
1+
FROM gcr.io/google_appengine/base
2+
83
RUN apt-get -q update && \
9-
apt-get install --no-install-recommends -y -q ca-certificates net-tools lsof \
4+
apt-get install --no-install-recommends -y -q \
105
python2.7 python-pip python-gevent python-greenlet && \
11-
apt-get -y -q upgrade && apt-get clean && rm /var/lib/apt/lists/*_*
6+
apt-get clean && rm /var/lib/apt/lists/*_*
7+
8+
COPY python-runtime-0.1.tar.gz /home/vmagent/python-runtime.tar.gz
129

13-
ADD python_vm_runtime.tar.gz /home/vmagent/python_vm_runtime
10+
RUN pip install --upgrade pip>=6.1.1 gunicorn==19.1.1
11+
RUN pip install /home/vmagent/python-runtime.tar.gz
1412

1513
EXPOSE 8080
1614

1715
RUN ln -s /home/vmagent/app /app
1816
WORKDIR /app
1917

20-
RUN ln -s /home/vmagent/python_vm_runtime/google /home/vmagent/app/google
21-
22-
ENTRYPOINT ["/usr/bin/env", "gunicorn", "-w", "4", "-k", "gevent", "-b", "0.0.0.0:8080", "wsgi:meta_app", "--log-file=-"]
23-
24-
ADD . /home/vmagent/app/
18+
ENTRYPOINT ["/usr/bin/env", "gunicorn", "-w", "4", "-k", "gevent", "-b", "0.0.0.0:8080", "google.appengine.vmruntime.wsgi:meta_app", "--log-file=-"]
2519

26-
RUN pip install -r base_requirements.txt
20+
ADD . /app

multicore_runtime/google

Lines changed: 0 additions & 1 deletion
This file was deleted.

setup.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
from setuptools import setup, find_packages
2+
3+
setup(name='python-runtime',
4+
version='0.1',
5+
description='Google App Engine-compatible Python runtime for Managed VMs',
6+
url='https://github.com/GoogleCloudPlatform/appengine-python-vm-runtime',
7+
author='Google',
8+
license='Apache License 2.0',
9+
classifiers=[
10+
'Development Status :: 3 - Alpha',
11+
'Intended Audience :: Developers',
12+
'License :: OSI Approved :: MIT License',
13+
'Programming Language :: Python :: 2',
14+
'Programming Language :: Python :: 2.7',
15+
],
16+
package_dir={'': 'python_vm_runtime',
17+
'google.appengine.vmruntime': 'multicore_runtime',},
18+
include_package_data=True,
19+
packages=find_packages('python_vm_runtime') + ['google.appengine.vmruntime'],
20+
# namespace_packages=['google'], # While google is a namespace, marking
21+
# it as such makes the installer skip
22+
# __init__.py, which breaks some
23+
# packages expecting google to have
24+
# a __file__ attribute.
25+
install_requires=['requests>=2.5.0',
26+
'webapp2>=2.5.2',
27+
'WebOb>=1.4',
28+
'PyYAML>=3.11',
29+
'Werkzeug>=0.10',],)

0 commit comments

Comments
 (0)