diff --git a/conda.recipe/build.sh b/conda.recipe/build.sh new file mode 100644 index 0000000..7eef327 --- /dev/null +++ b/conda.recipe/build.sh @@ -0,0 +1 @@ +CFLAGS="-fno-stack-protector -Wno-narrowing" $PYTHON -m pip install --no-deps --ignore-installed . diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml new file mode 100644 index 0000000..5b8bdc6 --- /dev/null +++ b/conda.recipe/meta.yaml @@ -0,0 +1,31 @@ +package: + name: pycld2 + version: 0.42 + +source: + - path: .. + +build: + number: 2 + +requirements: + host: + - python + + build: + - {{ compiler('cxx') }} + +test: + requires: + - python + + source_files: + - test_pycld2.py + + commands: + - python test_pycld2.py -v + +about: + home: https://github.com/aboSamoor/pycld2 + license: Apache Software License + summary: Python bindings around Google Chromium's embedded compact language detection library (CLD2) diff --git a/setup.py b/setup.py index c327b36..32c3210 100755 --- a/setup.py +++ b/setup.py @@ -17,6 +17,7 @@ import io import re +import platform from os import path import platform @@ -65,6 +66,10 @@ else: extra_compile_args = ["-w", "-O2", "-fPIC"] + +if platform.machine() == 'x86_64': + extra_compile_args.append("-m64") + module = setuptools.Extension( # First arg (name) is the full name of the extension, including # any packages - ie. not a filename or pathname, but Python dotted