From 90ba9f7bbf02537103b23214d23fc12577049628 Mon Sep 17 00:00:00 2001 From: Yann Sionneau Date: Tue, 14 Jul 2015 01:01:19 +0200 Subject: [PATCH] llvmlite: rename our package to be llvmlite_or1k to avoid collision with llvmlite package needed for numba --- artiq/coredevice/runtime.py | 4 +- artiq/py2llvm/ast_body.py | 2 +- artiq/py2llvm/base_types.py | 2 +- artiq/py2llvm/fractions.py | 2 +- artiq/py2llvm/lists.py | 2 +- artiq/py2llvm/module.py | 4 +- artiq/py2llvm/tools.py | 2 +- artiq/py2llvm/values.py | 2 +- artiq/test/py2llvm.py | 2 +- conda/llvmdev-or1k/meta.yaml | 1 + conda/llvmlite-or1k/meta.yaml | 5 +- misc/llvmlite-add-all-targets.patch | 78 +++++++++++++++++++++++++++++ 12 files changed, 92 insertions(+), 14 deletions(-) diff --git a/artiq/coredevice/runtime.py b/artiq/coredevice/runtime.py index 5841f9d65..8c45b6ed1 100644 --- a/artiq/coredevice/runtime.py +++ b/artiq/coredevice/runtime.py @@ -1,7 +1,7 @@ import os -import llvmlite.ir as ll -import llvmlite.binding as llvm +import llvmlite_or1k.ir as ll +import llvmlite_or1k.binding as llvm from artiq.py2llvm import base_types, fractions, lists from artiq.language import units diff --git a/artiq/py2llvm/ast_body.py b/artiq/py2llvm/ast_body.py index 3cba3a976..580d7f189 100644 --- a/artiq/py2llvm/ast_body.py +++ b/artiq/py2llvm/ast_body.py @@ -1,6 +1,6 @@ import ast -import llvmlite.ir as ll +import llvmlite_or1k.ir as ll from artiq.py2llvm import values, base_types, fractions, lists, iterators from artiq.py2llvm.tools import is_terminated diff --git a/artiq/py2llvm/base_types.py b/artiq/py2llvm/base_types.py index 9e6f809ef..3ef472984 100644 --- a/artiq/py2llvm/base_types.py +++ b/artiq/py2llvm/base_types.py @@ -1,4 +1,4 @@ -import llvmlite.ir as ll +import llvmlite_or1k.ir as ll from artiq.py2llvm.values import VGeneric diff --git a/artiq/py2llvm/fractions.py b/artiq/py2llvm/fractions.py index c2a9730fa..aae7575cc 100644 --- a/artiq/py2llvm/fractions.py +++ b/artiq/py2llvm/fractions.py @@ -1,7 +1,7 @@ import inspect import ast -import llvmlite.ir as ll +import llvmlite_or1k.ir as ll from artiq.py2llvm.values import VGeneric, operators from artiq.py2llvm.base_types import VBool, VInt, VFloat diff --git a/artiq/py2llvm/lists.py b/artiq/py2llvm/lists.py index ded97773e..e17ab5348 100644 --- a/artiq/py2llvm/lists.py +++ b/artiq/py2llvm/lists.py @@ -1,4 +1,4 @@ -import llvmlite.ir as ll +import llvmlite_or1k.ir as ll from artiq.py2llvm.values import VGeneric from artiq.py2llvm.base_types import VInt, VNone diff --git a/artiq/py2llvm/module.py b/artiq/py2llvm/module.py index 535b1ab51..75830971b 100644 --- a/artiq/py2llvm/module.py +++ b/artiq/py2llvm/module.py @@ -1,5 +1,5 @@ -import llvmlite.ir as ll -import llvmlite.binding as llvm +import llvmlite_or1k.ir as ll +import llvmlite_or1k.binding as llvm from artiq.py2llvm import infer_types, ast_body, base_types, fractions, tools diff --git a/artiq/py2llvm/tools.py b/artiq/py2llvm/tools.py index 27ffd8566..ba9e76949 100644 --- a/artiq/py2llvm/tools.py +++ b/artiq/py2llvm/tools.py @@ -1,4 +1,4 @@ -import llvmlite.ir as ll +import llvmlite_or1k.ir as ll def is_terminated(basic_block): return (basic_block.instructions diff --git a/artiq/py2llvm/values.py b/artiq/py2llvm/values.py index 554aad7c6..6f0b90e2c 100644 --- a/artiq/py2llvm/values.py +++ b/artiq/py2llvm/values.py @@ -1,7 +1,7 @@ from types import SimpleNamespace from copy import copy -import llvmlite.ir as ll +import llvmlite_or1k.ir as ll class VGeneric: diff --git a/artiq/test/py2llvm.py b/artiq/test/py2llvm.py index 9f2948db8..6eb607c7d 100644 --- a/artiq/test/py2llvm.py +++ b/artiq/test/py2llvm.py @@ -5,7 +5,7 @@ from fractions import Fraction from ctypes import CFUNCTYPE, c_int, c_int32, c_int64, c_double import struct -import llvmlite.binding as llvm +import llvmlite_or1k.binding as llvm from artiq.language.core import int64 from artiq.py2llvm.infer_types import infer_function_types diff --git a/conda/llvmdev-or1k/meta.yaml b/conda/llvmdev-or1k/meta.yaml index 87586bc24..9406b8943 100644 --- a/conda/llvmdev-or1k/meta.yaml +++ b/conda/llvmdev-or1k/meta.yaml @@ -12,6 +12,7 @@ build: requirements: build: - system [linux and not armv6] + - cmake [linux] run: - system [linux and not armv6] diff --git a/conda/llvmlite-or1k/meta.yaml b/conda/llvmlite-or1k/meta.yaml index 9dbd8ab83..2a0191ce5 100644 --- a/conda/llvmlite-or1k/meta.yaml +++ b/conda/llvmlite-or1k/meta.yaml @@ -9,7 +9,6 @@ source: requirements: build: - python - - llvmdev-or1k - setuptools run: - python @@ -19,8 +18,8 @@ build: test: imports: - - llvmlite - - llvmlite.llvmpy + - llvmlite_or1k + - llvmlite_or1k.llvmpy about: home: https://pypi.python.org/pypi/llvmlite/ diff --git a/misc/llvmlite-add-all-targets.patch b/misc/llvmlite-add-all-targets.patch index 6b52fad9f..8ce43beef 100644 --- a/misc/llvmlite-add-all-targets.patch +++ b/misc/llvmlite-add-all-targets.patch @@ -36,3 +36,81 @@ index bfaa5b2..7d0df11 100644 def initialize_native_target(): """ Initialize the native (host) target. Necessary before doing any +diff --git a/ffi/build.py b/ffi/build.py +index 3889ba5..58f93ec 100755 +--- a/ffi/build.py ++++ b/ffi/build.py +@@ -58,7 +58,7 @@ def find_win32_generator(): + + def main_win32(): + generator = find_win32_generator() +- config = 'Release' ++ config = 'Debug' + if not os.path.exists(build_dir): + os.mkdir(build_dir) + try_cmake(here_dir, build_dir, generator) +diff --git a/setup.py b/setup.py +index 6d28265..f4edd29 100644 +--- a/setup.py ++++ b/setup.py +@@ -15,10 +15,10 @@ from llvmlite.utils import get_library_files + import versioneer + + versioneer.VCS = 'git' +-versioneer.versionfile_source = 'llvmlite/_version.py' +-versioneer.versionfile_build = 'llvmlite/_version.py' ++versioneer.versionfile_source = 'llvmlite_or1k/_version.py' ++versioneer.versionfile_build = 'llvmlite_or1k/_version.py' + versioneer.tag_prefix = 'v' # tags are like v1.2.0 +-versioneer.parentdir_prefix = 'llvmlite-' # dirname like 'myproject-1.2.0' ++versioneer.parentdir_prefix = 'llvmlite_or1k-' # dirname like 'myproject-1.2.0' + + + here_dir = os.path.dirname(__file__) +@@ -54,7 +54,7 @@ class LlvmliteBuildExt(build_ext): + # HACK: this makes sure the library file (which is large) is only + # included in binary builds, not source builds. + self.distribution.package_data = { +- "llvmlite.binding": get_library_files(), ++ "llvmlite_or1k.binding": get_library_files(), + } + + +@@ -63,7 +63,7 @@ class LlvmliteInstall(install): + # This seems to only be necessary on OSX. + def run(self): + self.distribution.package_data = { +- "llvmlite.binding": get_library_files(), ++ "llvmlite_or1k.binding": get_library_files(), + } + install.run(self) + +@@ -74,14 +74,14 @@ cmdclass.update({'build': LlvmliteBuild, + }) + + +-packages = ['llvmlite', +- 'llvmlite.binding', +- 'llvmlite.ir', +- 'llvmlite.llvmpy', +- 'llvmlite.tests', ++packages = ['llvmlite_or1k', ++ 'llvmlite_or1k.binding', ++ 'llvmlite_or1k.ir', ++ 'llvmlite_or1k.llvmpy', ++ 'llvmlite_or1k.tests', + ] + +-setup(name='llvmlite', ++setup(name='llvmlite_or1k', + description="lightweight wrapper around basic LLVM functionality", + version=versioneer.get_version(), + classifiers=[ +@@ -96,6 +96,7 @@ setup(name='llvmlite', + "Topic :: Software Development :: Code Generators", + "Topic :: Software Development :: Compilers", + ], ++ package_dir={"llvmlite_or1k" : "llvmlite"}, + # Include the separately-compiled shared library + author="Continuum Analytics, Inc.", + author_email="numba-users@continuum.io",