-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from borgbackup/package
move code to a Package
- Loading branch information
Showing
14 changed files
with
321 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
.idea | ||
.pytest_cache | ||
.tox | ||
build | ||
dist | ||
__pycache__ | ||
src/borghash.egg-info | ||
src/borghash/_version.py | ||
src/borghash/borghash.cpp | ||
src/*.so | ||
**/*.so | ||
**/*.c | ||
**/*.egg-info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ pytest | |
pytest-benchmark | ||
build | ||
twine | ||
Cython |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,21 @@ | ||
from setuptools import setup | ||
from Cython.Build import cythonize | ||
from setuptools import Extension, setup | ||
|
||
try: | ||
from Cython.Build import cythonize | ||
except ImportError: | ||
cythonize = None # we don't have cython installed | ||
|
||
ext = '.pyx' if cythonize else '.c' | ||
|
||
extensions = [ | ||
Extension("borghash.HashTable", ["src/borghash/HashTable" + ext]), | ||
Extension("borghash.HashTableNT", ["src/borghash/HashTableNT" + ext]), | ||
] | ||
|
||
if cythonize: | ||
extensions = cythonize(extensions, language_level="3str") | ||
|
||
setup( | ||
package_data=dict(borghash=["borghash.pxd"]), | ||
ext_modules=cythonize("borghash.pyx") | ||
package_data={"borghash": ["*.pxd", "*.pyx"]}, | ||
ext_modules=extensions, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
cdef class HashTableNT: | ||
cdef int key_size | ||
cdef object value_type | ||
cdef object value_struct | ||
cdef int value_size | ||
cdef object inner |
Oops, something went wrong.