File: Makefile

package info (click to toggle)
nltk 3.9.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,384 kB
  • sloc: python: 78,923; makefile: 180; sh: 68; xml: 17
file content (54 lines) | stat: -rw-r--r-- 1,615 bytes parent folder | download
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
# Natural Language Toolkit: source Makefile
#
# Copyright (C) 2001-2024 NLTK Project
# Author: Steven Bird <stevenbird1@gmail.com>
#	 Edward Loper <edloper@gmail.com>
# URL: <https://www.nltk.org/>
# For license information, see LICENSE.TXT

PYTHON = python
VERSION = $(shell $(PYTHON) -c 'import nltk; print(nltk.__version__)' | sed '/^Warning: */d')
NLTK_URL = $(shell $(PYTHON) -c 'import nltk; print(nltk.__url__)' | sed '/^Warning: */d')

.PHONY: all clean clean_code

all: dist

########################################################################
# TESTING
########################################################################
DOCTEST_FILES = nltk/test/*.doctest
DOCTEST_CODE_FILES = nltk/*.py nltk/*/*.py

doctest:
	pytest $(DOCTEST_FILES)

doctest_code:
	pytest $(DOCTEST_CODE_FILES)

demotest:
	find nltk -name "*.py"\
        -and -not -path *misc* \
        -and -not -name brown_ic.py \
        -exec echo ==== '{}' ==== \; -exec python '{}' \;

########################################################################
# DISTRIBUTIONS
########################################################################

dist: clean_code
	$(PYTHON) -m build

########################################################################
# CLEAN
########################################################################

clean: clean_code
	rm -rf build web/_build iso dist api MANIFEST nltk-$(VERSION) nltk.egg-info

clean_code:
	rm -f `find nltk -name '*.pyc'`
	rm -f `find nltk -name '*.pyo'`
	rm -f `find . -name '*~'`
	rm -rf `find . -name '__pycache__'`
	rm -f MANIFEST # regenerate manifest from MANIFEST.in