diff --git a/package/pypi-server/local/.env.sample b/package/pypi-server/local/.env.sample deleted file mode 100644 index 8268ec9923..0000000000 --- a/package/pypi-server/local/.env.sample +++ /dev/null @@ -1,5 +0,0 @@ -# copy to .env and edit as needed -COMPOSE_PROJECT_NAME=local-pypi-server -# change to 0.0.0.0 to listen on all interfaces -HOST=127.0.0.1 -PORT=5159 diff --git a/package/pypi-server/local/.gitignore b/package/pypi-server/local/.gitignore deleted file mode 100644 index 4c49bd78f1..0000000000 --- a/package/pypi-server/local/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.env diff --git a/package/pypi-server/local/docker-compose.yaml b/package/pypi-server/local/docker-compose.yaml deleted file mode 100644 index 7db3697a28..0000000000 --- a/package/pypi-server/local/docker-compose.yaml +++ /dev/null @@ -1,12 +0,0 @@ -version: "3.2" -services: - pypi-server: - command: ["-a", ".", "-P", ".", "-v", "/data/packages"] - image: pypiserver/pypiserver:latest - ports: - - "${HOST}:${PORT}:8080" - restart: always - volumes: - - type: bind - source: ./packages - target: /data/packages diff --git a/package/pypi-server/local/packages/.gitignore b/package/pypi-server/local/packages/.gitignore deleted file mode 100644 index 72e8ffc0db..0000000000 --- a/package/pypi-server/local/packages/.gitignore +++ /dev/null @@ -1 +0,0 @@ -* diff --git a/package/pypi-server/prod/.env b/package/pypi-server/prod/.env deleted file mode 100644 index adc4736967..0000000000 --- a/package/pypi-server/prod/.env +++ /dev/null @@ -1 +0,0 @@ -COMPOSE_PROJECT_NAME=pypi-server diff --git a/package/pypi-server/prod/.gitignore b/package/pypi-server/prod/.gitignore deleted file mode 100644 index 1c84f7eaf4..0000000000 --- a/package/pypi-server/prod/.gitignore +++ /dev/null @@ -1 +0,0 @@ -htpasswd.txt diff --git a/package/pypi-server/prod/README.md b/package/pypi-server/prod/README.md deleted file mode 100644 index e0035f9cb9..0000000000 --- a/package/pypi-server/prod/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Production PyPI Server Setup - -This setup has been tested on a fresh Ubuntu 20.04 machine. - -1. SSH into the server and clone this repo. `ssh -A` will allow you to clone - the repo on the server using your local credentials. -2. Run `server-setup.bash` on the server to set up the server. During - certificate installation, use `dev@voxel51.com` and enable HTTP-to-HTTPS - forwarding if prompted. -3. Run `add-user.bash` on the server to set up an account for uploading - packages. diff --git a/package/pypi-server/prod/add-user.bash b/package/pypi-server/prod/add-user.bash deleted file mode 100755 index ea7e2a0e31..0000000000 --- a/package/pypi-server/prod/add-user.bash +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -if [[ -z "$1" ]]; then - echo "Usage: $0 USERNAME" - exit 2 -fi -username="$1" - -cd "$(dirname "$0")" -touch htpasswd.txt -htpasswd htpasswd.txt "$username" diff --git a/package/pypi-server/prod/docker-compose.yaml b/package/pypi-server/prod/docker-compose.yaml deleted file mode 100644 index a34363149f..0000000000 --- a/package/pypi-server/prod/docker-compose.yaml +++ /dev/null @@ -1,17 +0,0 @@ -version: "3.2" -services: - pypi-server: - command: ["-P", "/data/htpasswd.txt", "-a", "update", "/data/packages"] - image: pypiserver/pypiserver:latest - ports: - - "127.0.0.1:5159:8080" - restart: always - volumes: - - type: volume - source: packages - target: /data/packages - - type: bind - source: ./htpasswd.txt - target: /data/htpasswd.txt -volumes: - packages: diff --git a/package/pypi-server/prod/pypi.voxel51.com.conf b/package/pypi-server/prod/pypi.voxel51.com.conf deleted file mode 100644 index 2b381d305d..0000000000 --- a/package/pypi-server/prod/pypi.voxel51.com.conf +++ /dev/null @@ -1,37 +0,0 @@ -server { - server_name pypi.voxel51.com; - - root /var/www/html; - index index.html; - - client_max_body_size 250M; - - location / { - proxy_set_header Host $host; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Real-IP $remote_addr; - proxy_intercept_errors off; - - proxy_pass http://localhost:5159; - } - - listen [::]:443 ssl ipv6only=on; # managed by Certbot - listen 443 ssl; # managed by Certbot - ssl_certificate /etc/letsencrypt/live/pypi.voxel51.com/fullchain.pem; # managed by Certbot - ssl_certificate_key /etc/letsencrypt/live/pypi.voxel51.com/privkey.pem; # managed by Certbot - include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot - ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot -} - -server { - if ($host = pypi.voxel51.com) { - return 301 https://$host$request_uri; - } # managed by Certbot - - - listen 80; - listen [::]:80; - - server_name pypi.voxel51.com; - return 404; # managed by Certbot -} diff --git a/package/pypi-server/prod/server-setup.bash b/package/pypi-server/prod/server-setup.bash deleted file mode 100755 index 0278fd7b6b..0000000000 --- a/package/pypi-server/prod/server-setup.bash +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash - -if [[ -z "$1" ]]; then - echo "Usage: $0 HOSTNAME" - exit 2 -fi -hostname="$1" -username="$(whoami)" - -cd "$(dirname "$0")" -echo "This script is intended to be run on a fresh server to set up a PyPI registry." -read -p "Continue? [y/N] " reply -echo "" -if [[ ! "$reply" =~ [yY] ]]; then - exit 1 -fi - -set -ex - -sudo apt update -sudo apt upgrade - -sudo apt install \ - apache2-utils \ - certbot \ - docker-compose \ - docker.io \ - nginx \ - python3-certbot-nginx -# make Docker start on boot -sudo systemctl enable docker.service - -touch htpasswd.txt - -sudo certbot run --nginx -d pypi.voxel51.com - -sudo rm -f /etc/nginx/sites-enabled/default -sudo cp pypi.voxel51.com.conf /etc/nginx/sites-enabled -sudo service nginx reload - -# set up docker permissions - if this fails, log out, log in, and try again -sudo usermod -a -G docker "$username" -sudo -u "$username" docker-compose up -d - -set +x -echo "Installation successful! Now run ./add-user.bash to set up a PyPI user." diff --git a/setup.py b/setup.py index 387c1a1226..e204c7ea1c 100644 --- a/setup.py +++ b/setup.py @@ -13,8 +13,6 @@ class BdistWheelCustom(bdist_wheel): def finalize_options(self): bdist_wheel.finalize_options(self) - # pure Python, so build a wheel for any Python version - self.universal = True # make just the wheel require these packages, since they aren't needed # for a development installation self.distribution.install_requires += [