From face79d485ebaedc967575bf1f5aeaa0241024e8 Mon Sep 17 00:00:00 2001 From: fmoor Date: Fri, 2 Sep 2016 15:39:13 -0700 Subject: [PATCH 1/2] change bash prompt character from >>> to $ the bash prompt character was >>> which is the python prompt It should be $ --- docs/source/installing.rst | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/source/installing.rst b/docs/source/installing.rst index beabe4d..9bb3b36 100644 --- a/docs/source/installing.rst +++ b/docs/source/installing.rst @@ -101,12 +101,12 @@ authentication, so this shouldn't be used on production. .. code-block:: bash - >>> sudo apt-get install apache2 libapache2-mod-wsgi - >>> sudo apt-get install python-setuptools python-dev libxml2-dev libxslt-dev - >>> sudo easy_install Flask-Pypi-Proxy + $ sudo apt-get install apache2 libapache2-mod-wsgi + $ sudo apt-get install python-setuptools python-dev libxml2-dev libxslt-dev + $ sudo easy_install Flask-Pypi-Proxy - >>> mkdir -p /mnt/eggs/ - >>> sudo chown www-data:www-data -R /mnt/eggs/ + $ mkdir -p /mnt/eggs/ + $ sudo chown www-data:www-data -R /mnt/eggs/ Now, lets create the WSGI configuration file (in this example, I will create it on /mnt/eggs/flask_pypi_proxy.wsgi). The content of that file @@ -139,7 +139,7 @@ Restart Apache .. code-block:: bash - >>> sudo service apache2 restart + $ sudo service apache2 restart More advanced configuration @@ -150,14 +150,14 @@ virtualenv, also using HTTP basic auth to create some security for the eggs. .. code-block:: bash - >>> sudo apt-get install apache2 libapache2-mod-wsgi - >>> sudo apt-get install python-setuptools python-dev libxml2-dev libxslt-dev + $ sudo apt-get install apache2 libapache2-mod-wsgi + $ sudo apt-get install python-setuptools python-dev libxml2-dev libxslt-dev Now, create the user where the virtualenv will be installed: .. code-block:: bash - >>> sudo adduser pypi-proxy + $ sudo adduser pypi-proxy Adding user `pypi-proxy' ... Adding new group `pypi-proxy' (1001) ... Adding new user `pypi-proxy' (1001) with group `pypi-proxy' ... @@ -165,8 +165,8 @@ Now, create the user where the virtualenv will be installed: Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: - >>> sudo easy_install virtualenv - >>> sudo su - pypi-proxy + $ sudo easy_install virtualenv + $ sudo su - pypi-proxy The following steps will be executed as **pypi-proxy**: From 8695a5e0643577599234a50c2631bef3c0f69677 Mon Sep 17 00:00:00 2001 From: fmoor Date: Fri, 2 Sep 2016 15:50:19 -0700 Subject: [PATCH 2/2] add missing prompt characters and code-block types --- docs/source/using.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/source/using.rst b/docs/source/using.rst index 30f9338..3587cdf 100644 --- a/docs/source/using.rst +++ b/docs/source/using.rst @@ -13,8 +13,8 @@ To download a package from the proxy, there are two choices: .. code-block:: bash - pip install -i http://mypypiproxy/simple/ Flask - easy_install -i http://mypypiproxy/simple/ Flask + $ pip install -i http://mypypiproxy/simple/ Flask + $ easy_install -i http://mypypiproxy/simple/ Flask * Use the index url in a configuration file. For easy_install, it should be on **~/.pydistutils.cfg** (on Linux), and the file should have @@ -57,7 +57,7 @@ like: I you are using the configuration with basic auth, then the configuration file should look something like this: -.. code-block:: +.. code-block:: ini [distutils] index-servers = @@ -77,14 +77,14 @@ go to the **setup.py** of your project and run: .. code-block:: bash - python setup.py sdist upload -r myserver + $ python setup.py sdist upload -r myserver **IMPORTANT:** The command *register*, won't work if you are using basic auth. For example, if you run .. code-block:: bash - python setup.py register + $ python setup.py register and if your server is configured using basic auth, then register will return a 401 error. Simply upload the package without running register.