-
Notifications
You must be signed in to change notification settings - Fork 2
/
INSTALL
61 lines (40 loc) · 1.9 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
Installing discount
===================
Currently, this package compiles the Discount C library as a
dynamically linked library, which should live in same location as the
Python module. This is mainly for convenience but also because,
currently, the Discount source compiles a static library, which is not
useable with ctypes.
If you have ways to improve the setup.py script, let me know!
Basic installation
------------------
To compile and install the package into the current active Python site
environment, simply run:
python setup.py install
The setup script will download, unpack and configure the Discount
source tarball (more specifically, the build_ext subcommand does all
the heavy lifting) by default.
Advanced options
----------------
If installing the module into the current site environment is not an
option, you can build the extension explicitly:
python setup.py build_ext
Which will create the _discount.so file needed by the Python module.
You just need to put the _discount.so and the discount Python module
under your PYTHONPATH.
The build_ext command also takes some options that customize how the C
library itself is built:
--discount-src-path=PATH
Point build_ext to a custom path on your filesystem, containing
the unpacked Discount source files. This is mutually exclusive
with --discount-download-url.
--discount-download-url=URL
Point build_ext to a custom url to obtain the Discount source
files. The download url is assumed to be a .tar.gz file. This is
mutually exclusive with --discount-src-path
--discount-configure-opts=OPTIONS
Customize the compile flags passed to the ./configure.sh script
bundled with the Discount source. This should be a quoted string
like: "--enable-pandoc-header --relaxed-emphasis".
Please report any bugs with the setup.py script to the GitHub
project page, http://github.com/trapeze/python-discount/issues.