Skip to content

Commit

Permalink
llvmlite: rename our package to be llvmlite_or1k to avoid collision w…
Browse files Browse the repository at this point in the history
…ith llvmlite package needed for numba
fallen committed Jul 13, 2015
1 parent 56fc7a4 commit 90ba9f7
Showing 12 changed files with 92 additions and 14 deletions.
4 changes: 2 additions & 2 deletions artiq/coredevice/runtime.py
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion artiq/py2llvm/ast_body.py
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion artiq/py2llvm/base_types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import llvmlite.ir as ll
import llvmlite_or1k.ir as ll

from artiq.py2llvm.values import VGeneric

2 changes: 1 addition & 1 deletion artiq/py2llvm/fractions.py
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion artiq/py2llvm/lists.py
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions artiq/py2llvm/module.py
Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion artiq/py2llvm/tools.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import llvmlite.ir as ll
import llvmlite_or1k.ir as ll

def is_terminated(basic_block):
return (basic_block.instructions
2 changes: 1 addition & 1 deletion artiq/py2llvm/values.py
Original file line number Diff line number Diff line change
@@ -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:
2 changes: 1 addition & 1 deletion artiq/test/py2llvm.py
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
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
1 change: 1 addition & 0 deletions conda/llvmdev-or1k/meta.yaml
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ build:
requirements:
build:
- system [linux and not armv6]
- cmake [linux]
run:
- system [linux and not armv6]

5 changes: 2 additions & 3 deletions conda/llvmlite-or1k/meta.yaml
Original file line number Diff line number Diff line change
@@ -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/
78 changes: 78 additions & 0 deletions misc/llvmlite-add-all-targets.patch
Original file line number Diff line number Diff line change
@@ -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'

This comment has been minimized.

Copy link
@sbourdeauducq

sbourdeauducq Jul 14, 2015

Member

Do you really need this? In any case, this has nothing to do in this patch.

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',

This comment has been minimized.

Copy link
@sbourdeauducq

sbourdeauducq Jul 14, 2015

Member

See issue...

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",

0 comments on commit 90ba9f7

Please sign in to comment.