Skip to content

Commit e858872

Browse files
committed
Trying extra compile args and updated README.
1 parent b7c6126 commit e858872

2 files changed

Lines changed: 25 additions & 3 deletions

File tree

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,32 @@ Check the [examples](https://github.com/concordusapps/python-xmlsec/tree/master/
88

99
## Install
1010

11+
### Pre-Install
12+
13+
#### Linux
14+
15+
```sh
16+
apt-get install libxml2-dev libxmlsec1-dev
17+
```
18+
19+
#### Mac
20+
21+
```sh
22+
brew install libxml2 libxmlsec1
23+
```
24+
1125
### Automated
1226

1327
1. **xmlsec** can be installed through `easy_install` or `pip`.
1428

1529
```sh
1630
pip install xmlsec
1731
```
32+
33+
#### Mac
34+
35+
If you get any fatal errors about missing .h files, update your C_INCLUDE_PATH environment variable to
36+
include the appropriate files from the libxml2 and libxmlsec1 libraries.
1837

1938
### Manual
2039

setup.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,19 @@ def make_extension(name, cython=True):
7979

8080
# Process the `pkg-config` utility and discover include and library
8181
# directories.
82-
config = {
83-
'include_dirs': [],
84-
}
82+
config = {}
8583
for lib in ['libxml-2.0', 'xmlsec1-%s' % XMLSEC_CRYPTO]:
8684
config.update(parse(lib))
8785

86+
config['extra_compile_args'] = ['-DXMLSEC_CRYPTO_OPENSSL=1']
87+
8888
# List-ify config for setuptools.
8989
for key in config:
9090
config[key] = list(config[key])
9191

92+
if 'include_dirs' not in config:
93+
config['include_dirs'] = []
94+
9295
# Add the source directories for inclusion.
9396
config['include_dirs'].insert(0, 'src')
9497

0 commit comments

Comments
 (0)