-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (27 loc) · 1 KB
/
Makefile
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
VERSION = 0.1.0
all:
@echo build: Builds the python source dist package
@echo install: Installs python source dist package
@echo clean: Removes any generated files
@echo rst: uses pandoc to generate the README.rst file from README.md
clean:
rm -f -rf py_cpuutilization.egg-info
rm -f -rf dist
rm -f -rf py-cpuutilization-$(VERSION)
rm -f -rf py-cpuutilization-$(VERSION).tar.gz
build: clean
python setup.py sdist
mv dist/py-cpuutilization-$(VERSION).tar.gz py-cpuutilization-$(VERSION).tar.gz
rm -f -rf py_cpuutilization.egg-info
rm -f -rf dist
install: remove
tar xzf py-cpuutilization-$(VERSION).tar.gz
cd py-cpuutilization-$(VERSION)/ && sudo python setup.py install
rm -f -rf py-cpuutilization-$(VERSION)
@echo now try "from cpuutilization import cpuutilization"
@echo "cpuutilization.get_cpu_info()"
remove:
sudo rm -f -rf /usr/local/lib/python2.7/dist-packages/py_cpuutilization-$(VERSION)-py2.7.egg
rst:
rm -f -rf README.rst
pandoc --from=markdown --to=rst --output=README.rst README.md