From 16dca88c860076f8e8c1f09ddcb0400a5ae8c6a7 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Thu, 28 Apr 2022 10:41:37 -0500 Subject: [PATCH 1/4] fix up badges --- README.rst | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 9475e52..c3776bf 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,12 @@ -.. image:: https://badge.fury.io/py/codepy.png - :target: http://pypi.python.org/pypi/codepy +.. image:: https://gitlab.tiker.net/inducer/codepy/badges/main/pipeline.svg + :alt: Gitlab Build Status + :target: https://gitlab.tiker.net/inducer/codepy/commits/main +.. image:: https://github.com/inducer/codepy/workflows/CI/badge.svg + :alt: Github Build Status + :target: https://github.com/inducer/codepy/actions?query=branch%3Amain+workflow%3ACI +.. image:: https://badge.fury.io/py/codepy.svg + :alt: Python Package Index Release Page + :target: https://pypi.org/project/codepy/ CodePy is a C/C++ metaprogramming toolkit for Python. It helps you compile source code and dynamically load it into the Python interpreter. From 83325067b9b4513dad67f04b82eaa53ac8001bbd Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Thu, 28 Apr 2022 10:41:48 -0500 Subject: [PATCH 2/4] fix typos --- codepy/cuda.py | 2 +- codepy/jit.py | 2 +- codepy/toolchain.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/codepy/cuda.py b/codepy/cuda.py index 7c9245b..c9b7b0d 100644 --- a/codepy/cuda.py +++ b/codepy/cuda.py @@ -89,7 +89,7 @@ def compile(self, host_toolchain, nvcc_toolchain, nvcc_toolchain, "gpu", device_code, "gpu.cu", object=True, **local_nvcc_kwargs) # The name of the shared lib depends on the hex checksums of both - # host and device code to prevent accidentially returned a cached + # host and device code to prevent accidentally returned a cached # module with wrong linkage mod_name = f"codepy.temp.{host_checksum}.{device_checksum}.module" diff --git a/codepy/jit.py b/codepy/jit.py index f466264..c1fcb87 100644 --- a/codepy/jit.py +++ b/codepy/jit.py @@ -233,7 +233,7 @@ def compile_from_string(toolchain, name, source_string, been compiled at some point in the past. Compiler and Python API versions as well as versions of include files are taken into account when examining the cache. If *cache_dir* is ``None``, a default location is assumed. If it - is ``False``, no caching is perfomed. Proper locking is performed on the + is ``False``, no caching is performed. Proper locking is performed on the cache directory. Simultaneous use of the cache by multiple processes works as expected, but may lead to delays because of locking. By default, a process waits for 1 second before reattempting to acquire the *cache_dir* diff --git a/codepy/toolchain.py b/codepy/toolchain.py index 4b662b7..e488cd0 100644 --- a/codepy/toolchain.py +++ b/codepy/toolchain.py @@ -132,7 +132,7 @@ def with_optimization_level(self, level, **extra): If a subclass doesn't understand an "extra" argument, it should simply ignore it. - Level may also be "debug" to specifiy a debug build. + Level may also be "debug" to specify a debug build. Implemented by subclasses. """ From c8cad2f81f98f0da96182725c2fa39250d3a407c Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Thu, 28 Apr 2022 10:42:24 -0500 Subject: [PATCH 3/4] black setup.py --- setup.py | 76 +++++++++++++++++++++++++++----------------------------- 1 file changed, 37 insertions(+), 39 deletions(-) diff --git a/setup.py b/setup.py index 4b2278d..7ee2110 100644 --- a/setup.py +++ b/setup.py @@ -2,42 +2,40 @@ from setuptools import setup -setup(name="codepy", - version="2019.1", - description="Generate and execute native code at run time.", - long_description=open("README.rst").read(), - classifiers=[ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: Other Audience", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: MIT License", - "Natural Language :: English", - "Programming Language :: Python", - "Topic :: Scientific/Engineering", - "Topic :: Software Development :: Libraries", - "Topic :: Utilities", - ], - - author="Andreas Kloeckner", - url="http://mathema.tician.de/software/codepy", - author_email="inform@tiker.net", - license="MIT", - - packages=["codepy", "codepy.cgen"], - python_requires="~=3.6", - install_requires=[ - "pytools>=2015.1.2", - "numpy>=1.6", - "platformdirs>=2.2.0", - "cgen", - ], - - include_package_data=True, - package_data={ - "codepy": [ - "include/codepy/*.hpp", - ] - }, - - zip_safe=False) +setup( + name="codepy", + version="2019.1", + description="Generate and execute native code at run time.", + long_description=open("README.rst").read(), + classifiers=[ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: Other Audience", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", + "Topic :: Software Development :: Libraries", + "Topic :: Utilities", + ], + author="Andreas Kloeckner", + url="http://mathema.tician.de/software/codepy", + author_email="inform@tiker.net", + license="MIT", + packages=["codepy", "codepy.cgen"], + python_requires="~=3.6", + install_requires=[ + "pytools>=2015.1.2", + "numpy>=1.6", + "platformdirs>=2.2.0", + "cgen", + ], + include_package_data=True, + package_data={ + "codepy": [ + "include/codepy/*.hpp", + ] + }, + zip_safe=False, +) From 61e817debca374a054ac10413500b3ac8a5d8911 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Thu, 28 Apr 2022 11:20:50 -0500 Subject: [PATCH 4/4] remove flake8 exclude --- setup.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 6050cd3..f1124f0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,6 @@ [flake8] ignore = E126,E127,E128,E123,E226,E241,E242,E265,W503,E402 max-line-length=85 -exclude=pyopencl/compyte/ndarray,pyopencl/compyte/array.py inline-quotes = " docstring-quotes = """