<commit_before>import sys
from setuptools import setup, Extension
from nphusl import __version__
import numpy

CYTHONIZE = "--cythonize" in sys.argv
NO_CYTHON_EXT = "--no-cython-ext" in sys.argv
NO_SIMD_EXT = "--no-simd-ext" in sys.argv

if CYTHONIZE:
    sys.argv.remove("--cythonize")
if NO_SIMD_EXT:
    sys.argv.remove("--no-simd-ext")
if NO_CYTHON_EXT:
    sys.argv.remove("--no-cython-ext")


url = "https://github.com/TadLeonard/husl-numpy"
download = "{}/archive/{}.tar.gz".format(url, __version__)

long_description = """
HUSL color space conversion
===========================

A color space conversion library that works with numpy. See
http://husl-colors.org to learn about the HUSL color space.


Features
--------

1. Fast conversion to RGB from HUSL and vice versa. Convert a 1080p image to
HUSL in less than a second.
2. Seamless performance improvements with `NumExpr`, `Cython`, and `OpenMP`
(whichever's available).
3. Flexible `numpy` arrays as inputs and outputs. Plays nicely with `OpenCV`,
`MoviePy`, etc.

Installation
------------

1. `virtualenv env -p python3`
2. `source env/bin/activate`
3. `pip install numpy`
4. (optional) `pip install Cython`  (or NumExpr, but Cython is preferred)
5. `pip install git+https://github.com/TadLeonard/husl-numpy.git`

Basic usage
-----------

* `to_rgb(hsl)` Convert HUSL array to RGB integer array
* `to_husl(rgb)` Convert RGB integer array or grayscale float array to HUSL
* array
* `to_hue(rgb)` Convert RGB integer array or grayscale float array to array of
* hue values

More
====

See {url} for complete documentation.
""".format(url=url)

description = ("A HUSL color space conversion library that works with numpy")

classifiers = [
  'Development Status :: 5 - Production/Stable',
  'Intended Audience :: Developers',
  'Operating System :: OS Independent',
  'Programming Language :: Python :: 3',
  'Programming Language :: Python :: 3 :: Only',
  'Intended Audience :: Science/Research',
  'Topic :: Multimedia',
  'Topic :: Multimedia :: Graphics',
]

ext = '.pyx' if CYTHONIZE else '.c'
extensions = []
cython_compile_args = ("fopenmp", "-O3", "-ffast-math")
simd_compile_args = (
     "-DUSE_SEGMENTED_LIGHT_LUT",
     #"-DUSE_LINEAR_LIGHT_LUT",
     "-ftree-vectorize",
     "-ftree-vectorizer-verbose=8",
     #"-msse3",
     #"-mveclibabi=acml"
) + cython_compile_args

cython_ext = Extension("nphusl._cython_opt",
                       sources=["nphusl/_cython_opt"+ext],
                       extra_compile_args=cython_compile_args,<commit_msg>compile args must be lists<commit_after>import sys
from setuptools import setup, Extension
from nphusl import __version__
import numpy

CYTHONIZE = "--cythonize" in sys.argv
NO_CYTHON_EXT = "--no-cython-ext" in sys.argv
NO_SIMD_EXT = "--no-simd-ext" in sys.argv

if CYTHONIZE:
    sys.argv.remove("--cythonize")
if NO_SIMD_EXT:
    sys.argv.remove("--no-simd-ext")
if NO_CYTHON_EXT:
    sys.argv.remove("--no-cython-ext")


url = "https://github.com/TadLeonard/husl-numpy"
download = "{}/archive/{}.tar.gz".format(url, __version__)

long_description = """
HUSL color space conversion
===========================

A color space conversion library that works with numpy. See
http://husl-colors.org to learn about the HUSL color space.


Features
--------

1. Fast conversion to RGB from HUSL and vice versa. Convert a 1080p image to
HUSL in less than a second.
2. Seamless performance improvements with `NumExpr`, `Cython`, and `OpenMP`
(whichever's available).
3. Flexible `numpy` arrays as inputs and outputs. Plays nicely with `OpenCV`,
`MoviePy`, etc.

Installation
------------

1. `virtualenv env -p python3`
2. `source env/bin/activate`
3. `pip install numpy`
4. (optional) `pip install Cython`  (or NumExpr, but Cython is preferred)
5. `pip install git+https://github.com/TadLeonard/husl-numpy.git`

Basic usage
-----------

* `to_rgb(hsl)` Convert HUSL array to RGB integer array
* `to_husl(rgb)` Convert RGB integer array or grayscale float array to HUSL
* array
* `to_hue(rgb)` Convert RGB integer array or grayscale float array to array of
* hue values

More
====

See {url} for complete documentation.
""".format(url=url)

description = ("A HUSL color space conversion library that works with numpy")

classifiers = [
  'Development Status :: 5 - Production/Stable',
  'Intended Audience :: Developers',
  'Operating System :: OS Independent',
  'Programming Language :: Python :: 3',
  'Programming Language :: Python :: 3 :: Only',
  'Intended Audience :: Science/Research',
  'Topic :: Multimedia',
  'Topic :: Multimedia :: Graphics',
]

ext = '.pyx' if CYTHONIZE else '.c'
extensions = []
cython_compile_args = ["-fopenmp", "-O3", "-ffast-math"]
simd_compile_args = [
     #-DUSE_LINEAR_RGB_LUT",
     "-DUSE_SEGMENTED_LIGHT_LUT",
     #"-DUSE_LINEAR_LIGHT_LUT",
     #"-DUSE_CHROMA_LUT,"
     "-ftree-vectorize",
     "-ftree-vectorizer-verbose=8",
     #"-msse3",
     #"-mveclibabi=acml"
] + cython_compile_args

cython_ext = Extension("nphusl._cython_opt",
                       sources=["nphusl/_cython_opt"+ext],
                       extra_compile_args=cython_compile_args,
{'fraction_non_alphanumeric': 0.14823483518626876, 'fraction_numerical': 0.007411741759313439, 'mean_word_length': 3.748148148148148, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '993134', 'n_tokens_mistral': 1812, 'n_tokens_neox': 1724, 'n_words': 491}