-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathINSTALL
84 lines (52 loc) · 2.44 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
A variety of installation methods are possible.
1) git clone from github and run from repository
2) pip install (as either user, root or virtualenv)
3) build an RPM
4) build a deb (currently unimplemented)
5) Fedora (version>=28) with pypy3 in a virtualenv
1) clone the github repository
Use your system tools (yum, dnf, apt-get, pip) to install the python dependencies: psutil, appdirs, configargparse.
For example, on recent Fedora use: sudo dnf install python3-setuptools python3-configargparse python3-appdirs python3-psutil
git clone git://github.com/Zomojo/compiletools
Add the compiletools directory to your PATH
export PATH=$PATH:path_to_compiletools_repo
2a) pip install as user
On Ubuntu 16.04
pip install --user compiletools
will install into "~/.local/" so you need to have "~/.local/bin" in your path to pick up the executables.
On Ubuntu 17.04:
pip install compiletools
will install into "~/.local/" so you need to have "~/.local/bin" in your path to pick up the executables.
2b) pip install as root
On Ubuntu 16.04
sudo pip install compiletools
will install into /usr/local. By default /usr/local/bin is in your path so no extra work is required.
On Ubuntu 17.04:
sudo -H pip install compiletools
will install into /usr/local. By default /usr/local/bin is in your path so no extra work is required.
3) Build an RPM (these instructions were tested on Fedora 31)
Make sure you have the building tools installed
sudo dnf install rpm-build python3-setuptools python3-docutils python3-configargparse python3-appdirs python3-psutil python3-devel
Then download a tarball and turn it into the RPM
rpmhome=$(rpm --eval %_topdir)
pushd "$rpmhome"
tag="v4.1.73"
tarball=${tag}.tar.gz
curl -L "https://github.com/Zomojo/compiletools/archive/${tarball}" -o "SOURCES/${tarball}"
rpmbuild -tb "SOURCES/${tarball}"
popd
dnf install ${rpmhome}/RPMS/noarch/python-compiletools-*.noarch.rpm
5) Fedora (>=28) with pypy3 in a virtual env
# Get a python3 version of pypy
sudo dnf install pypy3 pypy3-devel
# Create the virtual env
WORKON_HOME=${HOME}/venvs
pypy3 -m venv ${WORKON_HOME}/compiletools-pypy
source ${WORKON_HOME}/compiletools-pypy/bin/activate
# The install will try to put some config files into /etc/xdg/ct/ which needs to exist
sudo mkdir /etc/xdg/ct/
sudo chmod a+rwx /etc/xdg/ct/
# If you are going to work from the git repo then just install the dependencies
# pip install configargparse appdirs psutil
# otherwise you can
pip install compiletools