Skip to content

Commit

Permalink
Merge pull request #43 from anhaidgroup/dev
Browse files Browse the repository at this point in the history
0.3.5 changes
  • Loading branch information
Anson-Doan committed Feb 5, 2024
2 parents 2195839 + e4dd137 commit fb5b974
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
4 changes: 4 additions & 0 deletions CHANGES.txt
@@ -1,3 +1,7 @@
v0.3.5 - 2/2/2024
* Edited setup.py to fix erroneously raising 'ImportError: pip is missing' during pip install
* Reverted to using cythonize.py due to errors with new cythonize implementation

v0.3.4 - 2/2/2024
* Added support for Python 3.12
* Discontinued usage of cythonize.py during setup due to Python 3.12 compatibility issues
Expand Down
2 changes: 1 addition & 1 deletion py_stringsimjoin/__init__.py
@@ -1,5 +1,5 @@

__version__ = '0.3.4'
__version__ = '0.3.5'

# determine whether to use available cython implementations
__use_cython__ = True
Expand Down
29 changes: 13 additions & 16 deletions setup.py
Expand Up @@ -13,14 +13,13 @@
except ImportError:
PIP_INSTALLED = False

if not PIP_INSTALLED:
raise ImportError('pip is not installed.')

def install_and_import(package):
import importlib
try:
importlib.import_module(package)
except ImportError:
if not PIP_INSTALLED:
raise ImportError('pip is not installed.')
pip.main(['install', package])
finally:
globals()[package] = importlib.import_module(package)
Expand Down Expand Up @@ -67,14 +66,14 @@ def build_extensions(self):


def generate_cython():
from Cython.Build import cythonize

module_list = [MODULES[key]['sources'][0] for key in MODULES.keys()]
print(module_list)

p = cythonize(module_list)

if not p:
cwd = os.path.abspath(os.path.dirname(__file__))
print("Cythonizing sources")
p = subprocess.call([sys.executable, os.path.join(cwd,
'build_tools',
'cythonize.py'),
'py_stringsimjoin'],
cwd=cwd)
if p != 0:
raise RuntimeError("Running cythonize failed!")


Expand Down Expand Up @@ -195,7 +194,7 @@ def setup_package():
if (ccompiler.new_compiler().compiler_type == 'msvc'
and msvccompiler.get_build_version == 9):
include_dirs.append(os.path.join(root, 'include', 'msvc9'))

if not is_source_release(root):
generate_cython()

Expand All @@ -205,17 +204,15 @@ def setup_package():
e = setuptools.Extension(name, sources=curr_mod['sources'],
extra_compile_args=curr_mod['comargs'], language='c++')
extensions.append(e)




packages = setuptools.find_packages()
with open('README.rst') as f:
LONG_DESCRIPTION = f.read()

cmdclass = {"build_ext": build_ext}
setuptools.setup(
name='py-stringsimjoin',
version='0.3.4',
version='0.3.5',
description='Python library for performing string similarity joins.',
long_description=LONG_DESCRIPTION,
url='https://sites.google.com/site/anhaidgroup/projects/magellan/py_stringsimjoin',
Expand Down

0 comments on commit fb5b974

Please sign in to comment.