Skip to content
This repository was archived by the owner on Aug 14, 2020. It is now read-only.

Commit c74f847

Browse files
committed
Fix #9 - OS X doesn't have librt
1 parent efb9c42 commit c74f847

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ Python binding for [ToxCore](https://github.com/irungentoo/toxcore).
1010
* [Fedora, openSUSE, CentOS](http://software.opensuse.org/download.html?project=home:antonbatenev:tox&package=python-toxcore)
1111
* [Arch](http://software.opensuse.org/download.html?project=home:antonbatenev:tox&package=python-toxcore), [Arch AUR](https://aur.archlinux.org/packages/python-toxcore) (see also [AUR Helpers](https://wiki.archlinux.org/index.php/AUR_Helpers))
1212

13+
### Compile from sources
14+
15+
```
16+
$ python setup.py build
17+
$ python setup.py install
18+
```
19+
1320
### Usage
1421

1522
See [Echo Bot Example](https://github.com/abbat/pytoxcore/tree/master/examples).

setup.py

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1+
import sys
12
from distutils.core import setup, Extension
23

4+
libraries = ["toxcore", "toxav", "toxdns", "sodium", "vpx", "opus"]
5+
6+
if sys.platform != "darwin":
7+
libraries.append("rt")
8+
39
setup(
410
name = "pytoxcore",
511
version = "0.2.3",
6-
description = 'Python binding for ToxCore',
7-
author = 'Anton Batenev',
8-
author_email = '[email protected]',
9-
url = 'http://github.com/abbat/pytoxcore',
10-
license = 'GPL',
12+
description = "Python binding for ToxCore",
13+
author = "Anton Batenev",
14+
author_email = "[email protected]",
15+
url = "http://github.com/abbat/pytoxcore",
16+
license = "GPL",
1117
ext_modules = [
1218
Extension(
1319
"pytoxcore",
@@ -16,7 +22,7 @@
1622
include_dirs = ["/usr/tox/include"],
1723
library_dirs = ["/usr/tox/lib"],
1824
extra_compile_args = ["-Wall", "-Werror", "-Wno-declaration-after-statement"],
19-
libraries = ["toxcore", "toxav", "toxdns", "sodium", "vpx", "opus", "rt"]
25+
libraries = libraries
2026
)
2127
]
2228
)

0 commit comments

Comments
 (0)