summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md5
-rw-r--r--README.md18
-rw-r--r--dev.requirements.txt1
-rw-r--r--requirements.txt1
-rw-r--r--requirements_alt.txt1
-rwxr-xr-xsetup.py9
-rw-r--r--slugify/__init__.py2
-rw-r--r--slugify/slugify.py4
8 files changed, 17 insertions, 24 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e2eed12..b5a37aa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 3.0.0
+ - Upgrade Unidecode
+ - Promote text-unidecode as the primary decoding package
+ - Add Unidecode as an optional extra. "pip install python-slugify[unidecode]"
+
## 2.0.1
- Add replacements option e.g. [['|', 'or'], ['%', 'percent'], ['-', '_']] (@andriyor)
diff --git a/README.md b/README.md
index bc4d9e8..13c94a7 100644
--- a/README.md
+++ b/README.md
@@ -15,24 +15,16 @@ 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.
+This module, by default installs and uses [text-unidecode](https://github.com/kmike/text-unidecode) *(GPL & Perl Artistic)* for its decoding needs.
-In cases where both `Unidecode` and `text-unidecode` are installed, `Unidecode` is used as the default decoding module.
+However, there is an alternative decoding package called [Unidecode](https://github.com/avian2/unidecode) *(GPL)*. It can be installed as `python-slugify[unidecode]` for those who prefer it.
How to install
====================
-
- 1. easy_install python-slugify
- 2. pip install python-slugify
- 3. git clone http://github.com/un33k/python-slugify
- a. cd python-slugify
- b. python setup.py install
- 4. wget https://github.com/un33k/python-slugify/zipball/master
- a. unzip the downloaded file
- b. cd python-slugify-*
- c. python setup.py install
-
+ easy_install python-slugify |OR| easy_install python-slugify[unidecode]
+ -- OR --
+ pip install python-slugify |OR| pip install python-slugify[unidecode]
How to use
====================
diff --git a/dev.requirements.txt b/dev.requirements.txt
new file mode 100644
index 0000000..f87605e
--- /dev/null
+++ b/dev.requirements.txt
@@ -0,0 +1 @@
+pycodestyle==2.5.0 \ No newline at end of file
diff --git a/requirements.txt b/requirements.txt
deleted file mode 100644
index 656daab..0000000
--- a/requirements.txt
+++ /dev/null
@@ -1 +0,0 @@
-Unidecode>=0.04.16
diff --git a/requirements_alt.txt b/requirements_alt.txt
deleted file mode 100644
index 980e50a..0000000
--- a/requirements_alt.txt
+++ /dev/null
@@ -1 +0,0 @@
-text-unidecode>=1.2 \ No newline at end of file
diff --git a/setup.py b/setup.py
index ab59194..a78b672 100755
--- a/setup.py
+++ b/setup.py
@@ -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 = ['text-unidecode==1.2']
+extras_require = {'unidecode': ['Unidecode==1.0.23']}
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']