mirror of
https://github.com/rspeer/wordfreq.git
synced 2024-12-23 09:21:37 +00:00
Another Py3 change, this one for functools32
This commit is contained in:
parent
de41143159
commit
74cfb69f5a
6
setup.py
6
setup.py
@ -92,6 +92,10 @@ class CustomDevelopCommand(develop):
|
||||
self.run_command('download_db')
|
||||
|
||||
|
||||
requirements = ['ftfy >= 3']
|
||||
if sys.version_info.major == 2:
|
||||
requirements.append('functools32 == 3.2.3-1')
|
||||
|
||||
setup(
|
||||
name="wordfreq",
|
||||
version=config.VERSION,
|
||||
@ -104,7 +108,7 @@ setup(
|
||||
classifiers = classifiers,
|
||||
long_description = "\n".join(doclines[2:]),
|
||||
packages=['wordfreq'],
|
||||
install_requires=['ftfy >= 3', 'functools32 == 3.2.3-1'],
|
||||
install_requires=requirements,
|
||||
cmdclass = {
|
||||
'build_db': BuildDatabaseCommand,
|
||||
'download_db': DownloadDatabaseCommand,
|
||||
|
@ -1,6 +1,11 @@
|
||||
from wordfreq.config import DB_FILENAME, CACHE_SIZE
|
||||
from functools32 import lru_cache
|
||||
import sqlite3
|
||||
import sys
|
||||
|
||||
if sys.version_info.major == 2:
|
||||
from functools32 import lru_cache
|
||||
else:
|
||||
from functools import lru_cache
|
||||
|
||||
SQLITE_ERROR_TEXT = """
|
||||
Couldn't open the wordlist database.
|
||||
|
Loading…
Reference in New Issue
Block a user