File: Makefile

package info (click to toggle)
libedlib 1.2.7-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,532 kB
  • sloc: cpp: 2,002; sh: 304; python: 131; makefile: 89; ansic: 7
file content (39 lines) | stat: -rw-r--r-- 1,212 bytes parent folder | download | duplicates (3)
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
default: build

.PHONY:
edlib: $(shell find ../../edlib)
	# create a clean (maybe updated) copy of edlib src
	rm -rf edlib && cp -r ../../edlib .

pyedlib.bycython.cpp: edlib.pyx cedlib.pxd
	cython3 --cplus edlib.pyx -o edlib.bycython.cpp

# To build package, README.rst is needed, because it goes into long description of package,
# which is what is visible on PyPI.
# However, to generate README.rst from README-tmpl.rst, built package is needed (for `import edlib` in cog)!
# Therefore, we first build package without README.rst, use it to generate README.rst,
# and then finally build package again but with README.rst.

BUILD_SOURCE_FILES=edlib pyedlib.bycython.cpp setup.py

buildWithoutREADME.rst: ${BUILD_SOURCE_FILES}
	EDLIB_OMIT_README_RST=1 python3 setup.py build_ext -i

README.rst: buildWithoutREADME.rst README-tmpl.rst
	cog -d -o README.rst README-tmpl.rst	

BUILD_FILES=${BUILD_SOURCE_FILES} README.rst

build: ${BUILD_FILES}
	python3 setup.py build_ext -i

sdist: edlib pyedlib.bycython.cpp setup.py README.rst MANIFEST.in
	python3 setup.py sdist

publish: clean sdist
	twine upload dist/*

clean:
	rm -rf edlib dist edlib.egg-info build
	rm -f edlib.c *.bycython.* edlib.*.so
	rm -f README.rst