python-setuptools - Download, build, install, upgrade and uninstall Python packages ChangeLog

HOWTO


# Python Setuptools 28.0.0
# ========================
# Prerequisites:
# Python >= 2.6

# There is a link to a bootstrap script for Python < 2.6 on the web site

# If you ever want to remove it, or clean up files from old versions before
# installing a new one, skip down to the bottom for instructions

# Things can get crazy when you install things with both pip and
# easy_install  If you've previously installed setuptools with pip, you're
# probably better off using that to upgrade it:
# su -c "pip install --upgrade setuptools"

# Here is some info about using Easy Install:
# https://setuptools.readthedocs.io/en/latest/easy_install.html


## Installation Method #1
## Download and run the bootstrap script

# Become root
su -

# Get it and run it
#
# If you don't have any SSL certificates to verify it with and get an error
# you may need to pass --no-check-certificate to wget
#
wget https://bootstrap.pypa.io/ez_setup.py -O - | python

# (done)


## Installation Method #2
## Install from source tarball

# Get it
cd
test -f installed/setuptools-28.0.0.tar.gz &&
mv -f setuptools-28.0.0.tar.gz .
test ! -f setuptools-28.0.0.tar.gz &&
wget https://pypi.python.org/packages/f7/94/eee867605a99ac113c4108534ad7c29\
2ed48bf1d06dfe7b63daa51e49987/setuptools-28.0.0.tar.gz

# Verify tarball w/ md5sum:
echo "9b23df90e1510c7353a5cf07873dcd22  setuptools-28.0.0.tar.gz" | md5sum -c

# Extract it
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "setuptools-*" -exec rm -r {} \;
tar xzvf ~/setuptools-28.0.0.tar.gz
cd setuptools-28.0.0
test $UID = 0 && chown -R root:root .

# Build it
python setup.py build

# Become root to install it
su

# Install it
python setup.py install

# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .

# Become yourself again
exit

# Save the tarball for later
cd
mkdir -p -m 0700 installed
rm -f installed/setuptools-*.tar.*
mv setuptools-28.0.0.tar.gz installed/


# If you ever want to uninstall Setuptools, this should do it:
cd
find ~/src -maxdepth 1 -type d -name "setuptools-*" -exec rm -r {} \;
rm -f ~/installed/setuptools-*.tar.*
su
ls -ld /usr/lib*/python*/site-packages/setuptools*
# Remove that stuff
exit

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EDT -0400)
HOWTO last updated: 2016-10-01 4:25pm
Copyright © 2001-2024 Jason Englander. All Rights reserved.
[HTML5]