mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
e7c40a08af
Importing pokedex can take several seconds due to its rather large dependencies—in particular, sqlalchemy, whoosh, and pkg_resources seem to be the largest offenders. Normally, it would be possible to import only the submodules one needs (pokedex.db, say), but pokedex.__init__ brings in all the submodules, for use by the command-line interface. The fix is rather obvious: - Move the command-line stuff into pokedex.main. Note: because the submodules are no longer imported by default, any script which expects `import pokedex` to be useful will likely break. Note: the `pokedex` command will not work until you re-run `python setup.py develop`, to update entry_points.txt. - Don't import pkg_resources until necessary.
22 lines
453 B
Python
22 lines
453 B
Python
from setuptools import setup, find_packages
|
|
setup(
|
|
name = 'Pokedex',
|
|
version = '0.1',
|
|
zip_safe = False,
|
|
packages = find_packages(),
|
|
package_data = {
|
|
'pokedex': ['data/csv/*.csv']
|
|
},
|
|
install_requires=[
|
|
'SQLAlchemy>=0.6.6',
|
|
'whoosh>=1.1.0',
|
|
'markdown',
|
|
'construct',
|
|
],
|
|
|
|
entry_points = {
|
|
'console_scripts': [
|
|
'pokedex = pokedex.main:main',
|
|
],
|
|
},
|
|
)
|