From df678c29b0f4c90c89d35f4cf6e59d638f157efa Mon Sep 17 00:00:00 2001 From: dave Date: Sat, 10 Feb 2018 15:34:25 -0800 Subject: [PATCH] Make requirements and docbuilder simpler --- docs/builder/Dockerfile | 27 +++++---------------------- docs/builder/build-docs.sh | 4 ++++ docs/builder/build.sh | 3 +++ requirements.txt | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+), 22 deletions(-) create mode 100755 docs/builder/build-docs.sh create mode 100755 docs/builder/build.sh create mode 100644 requirements.txt diff --git a/docs/builder/Dockerfile b/docs/builder/Dockerfile index 9e88449..0892037 100644 --- a/docs/builder/Dockerfile +++ b/docs/builder/Dockerfile @@ -1,30 +1,13 @@ FROM ubuntu:artful +ADD ./ /tmp/pyircbot/ + RUN apt-get update ; \ - apt-get install -y python3 python3-sphinx python3-setuptools python3-dev python3-requests python3-pip python3-lxml make wget unzip libmysqlclient-dev + apt-get install -y python3 python3-sphinx python3-setuptools python3-dev python3-pip make wget unzip git -RUN pip3 install pytz praw releases cherrypy twilio==6.9.0 +RUN cd /tmp/pyircbot/ && pip3 install -r requirements.txt -RUN cd /tmp ; \ - wget -O msgbus.tar.gz 'http://gitlab.davepedu.com/dave/pymsgbus/repository/archive.tar.gz?ref=master' && \ - mkdir pymsgbus && tar zxvf msgbus.tar.gz --strip-components 1 -C pymsgbus/ &&\ - cd pymsgbus && \ - pip3 install -r requirements.txt && \ - python3 setup.py install - -RUN cd /tmp ; \ - wget https://github.com/jgarzik/python-bitcoinrpc/archive/master.zip ; \ - unzip master.zip ; \ - cd python-bitcoinrpc-master/ ; \ - python3 setup.py install - -RUN cd /tmp ; \ - wget https://github.com/dpedu/MySQL-for-Python-3/archive/master.zip -O mysqldb.zip ; \ - unzip mysqldb.zip ; \ - cd MySQL-for-Python-3-master/ ; \ - python3 setup.py install - -COPY start /start +COPY docs/builder/start /start RUN chmod +x /start ; \ mkdir /tmp/docs diff --git a/docs/builder/build-docs.sh b/docs/builder/build-docs.sh new file mode 100755 index 0000000..b28cd8e --- /dev/null +++ b/docs/builder/build-docs.sh @@ -0,0 +1,4 @@ +#!/bin/sh -ex + +sudo docker run -it --rm -v $PWD/:/tmp/pyircbot/ pybdocbuilder bash + diff --git a/docs/builder/build.sh b/docs/builder/build.sh new file mode 100755 index 0000000..1480bcb --- /dev/null +++ b/docs/builder/build.sh @@ -0,0 +1,3 @@ +#!/bin/sh -ex + +docker build -t pybdocbuilder -f docs/builder/Dockerfile . diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..1cf3b32 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,35 @@ +alabaster==0.7.10 +Babel==2.5.3 +certifi==2017.11.5 +chardet==3.0.4 +cheroot==6.0.0 +CherryPy==13.1.0 +docutils==0.14 +idna==2.6 +imagesize==0.7.1 +Jinja2==2.10 +lxml==4.1.1 +MarkupSafe==1.0 +more-itertools==4.0.1 +pyzmq==16.0.3 +-e git+http://gitlab.davepedu.com/dave/pymsgbus.git@2a5639a28bdf483098e1be73fb382e4e745803f5#egg=msgbus +portend==2.2 +praw==5.3.0 +prawcore==0.13.0 +Pygments==2.2.0 +PyJWT==1.5.3 +PyMySQL==0.8.0 +PySocks==1.6.8 +-e git+https://github.com/jgarzik/python-bitcoinrpc.git@76ced424dc16f997365265487487056e653238c6#egg=python_bitcoinrpc +pytz==2017.3 +releases==1.4.0 +requests==2.18.4 +semantic-version==2.6.0 +six==1.11.0 +snowballstemmer==1.2.1 +Sphinx==1.6.6 +sphinxcontrib-websupport==1.0.1 +tempora==1.10 +twilio==6.9.0 +update-checker==0.16 +urllib3==1.22