diff options
author | Val Neekman <val@neekware.com> | 2019-02-22 17:58:56 -0500 |
---|---|---|
committer | Val Neekman <val@neekware.com> | 2019-02-22 17:58:56 -0500 |
commit | 7addc366c4187d558bce3c719333936a6974fcc1 (patch) | |
tree | 3b70f99f9b613473b3177454596fa21c56f8e056 | |
parent | f7c6d4a0673f681493062cd3efe694b6ef65c705 (diff) | |
download | python-slugify-7addc366c4187d558bce3c719333936a6974fcc1.tar.gz |
add text-unidecode option as extra
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | README.md | 5 | ||||
-rwxr-xr-x | setup.py | 9 | ||||
-rw-r--r-- | slugify/__init__.py | 2 | ||||
-rw-r--r-- | slugify/slugify.py | 4 |
5 files changed, 12 insertions, 12 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index e2eed12..f4f37a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.0.0 + - Upgrade Unidecode + - Allow install of text-unidecode as extra. "pip install python-slugify[text-unidecode]" + ## 2.0.1 - Add replacements option e.g. [['|', 'or'], ['%', 'percent'], ['-', '_']] (@andriyor) @@ -15,9 +15,8 @@ Overview Notice ==================== -By default, this modules installs and uses [Unidecode](https://github.com/avian2/unidecode) *(GPL)* for its decoding needs. However if you wish to use [text-unidecode](https://github.com/kmike/text-unidecode) *(GPL & Perl Artistic)* instead, please ensure it is installed prior to `python-slugify` installation. - -In cases where both `Unidecode` and `text-unidecode` are installed, `Unidecode` is used as the default decoding module. +By default, this modules installs and uses [Unidecode](https://github.com/avian2/unidecode) *(GPL)* for its decoding needs. However if you wish to use [text-unidecode](https://github.com/kmike/text-unidecode) *(GPL & Perl Artistic)* instead, you must +install it as `python-slugify[text-unidecode]`. How to install @@ -7,12 +7,6 @@ import os import sys import codecs -install_requires = [] -try: - import text_unidecode -except ImportError: - install_requires.append('Unidecode>=0.04.16') - name = 'python-slugify' package = 'slugify' description = 'A Python Slugify application that handles Unicode' @@ -20,6 +14,8 @@ url = 'https://github.com/un33k/python-slugify' author = 'Val Neekman' author_email = 'info@neekware.com' license = 'MIT' +install_requires = ['Unidecode==1.0.23'] +extras_require = {'text-unidecode': ['text-unidecode==1.2']} classifiers = [ 'Development Status :: 5 - Production/Stable', @@ -70,6 +66,7 @@ setup( author_email=author_email, packages=find_packages(exclude=EXCLUDE_FROM_PACKAGES), install_requires=install_requires, + extras_require=extras_require, classifiers=classifiers, entry_points={'console_scripts': ['slugify=slugify.slugify:main']}, ) diff --git a/slugify/__init__.py b/slugify/__init__.py index 7358b99..c2e205b 100644 --- a/slugify/__init__.py +++ b/slugify/__init__.py @@ -3,4 +3,4 @@ from .slugify import * __author__ = 'Val Neekman @ Neekware Inc. [@vneekman]' __description__ = 'A Python slugify application that also handles Unicode' -__version__ = '2.0.1' +__version__ = '3.0.0' diff --git a/slugify/slugify.py b/slugify/slugify.py index 59e9672..fcd1d22 100644 --- a/slugify/slugify.py +++ b/slugify/slugify.py @@ -14,9 +14,9 @@ except ImportError: unichr = chr try: - import unidecode -except ImportError: import text_unidecode as unidecode +except ImportError: + import unidecode __all__ = ['slugify', 'smart_truncate'] |