Skip to content
This repository was archived by the owner on Jan 12, 2018. It is now read-only.

Commit 2632cfe

Browse files
author
scanny
committed
Merge pull request #40 from bjlange/fix-setup
add setuptools as preferred library for setup.py
2 parents df08b86 + 2a93960 commit 2632cfe

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

README.markdown

+9
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ Thanks to the awesomeness of the lxml module, we can:
5252

5353
Congratulations, you just made and then modified a Word document!
5454

55+
Alternatively, if you have setuptools and pip, you can run `pip
56+
install docx` to install the package and its dependencies, and
57+
download
58+
[example-makedocument.py](https://raw.github.com/mikemaccana/python-docx/master/example-makedocument.py)
59+
and
60+
[example-extracttext.py](https://raw.github.com/mikemaccana/python-docx/master/example-extracttext.py)
61+
to test them out. Note that lxml requires that libxml2-dev and
62+
libxslt1-dev are installed.
63+
5564
## Extracting Text from a Document
5665

5766
If you just want to extract the text from a Word file, run:

setup.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/usr/bin/env python
22

3-
from distutils.core import setup
3+
try:
4+
from setuptools import setup
5+
except ImportError:
6+
from distutils.core import setup
47
from glob import glob
58

69
# Make data go into site-packages (http://tinyurl.com/site-pkg)
@@ -10,7 +13,7 @@
1013

1114
setup(name='docx',
1215
version='0.2.0',
13-
requires=['lxml'],
16+
install_requires=['lxml', 'PIL'],
1417
description='The docx module creates, reads and writes Microsoft Office Word 2007 docx files',
1518
author='Mike MacCana',
1619
author_email='[email protected]',

0 commit comments

Comments
 (0)