diff options
Diffstat (limited to 'setup.py')
| -rwxr-xr-x | setup.py | 64 |
1 files changed, 29 insertions, 35 deletions
@@ -1,30 +1,15 @@ #!/usr/bin/env python -# Don't use __future__ in this script, it breaks buildout -# from __future__ import print_function import os import sys import shutil from setuptools import setup, find_packages from setuptools.command.install import install -from setuptools.command.test import test as TestCommand - - -class PyTest(TestCommand): - def finalize_options(self): - TestCommand.finalize_options(self) - self.test_args = [] - self.test_suite = True - - def run_tests(self): - # import here, cause outside the eggs aren't loaded - import pytest - errno = pytest.main(self.test_args) - sys.exit(errno) +from setuptools.command.build_py import build_py with open('requirements.txt', 'r') as fh: - dependencies = [l.strip() for l in fh] + dependencies = [l.strip().split("#")[0] for l in fh] extras = {} @@ -37,10 +22,10 @@ with open('requirements-tests.txt', 'r') as fh: extras['tests'] = [l.strip() for l in fh][1:] # ########## platform specific stuff ############# -if sys.version_info[0] == 2 and sys.version_info[1] < 7: - raise Exception('Python 2 version < 2.7 is not supported') -elif sys.version_info[0] == 3 and sys.version_info[1] < 3: - raise Exception('Python 3 version < 3.3 is not supported') +if sys.version_info[0] == 2: + raise Exception('Python 2 is not supported') +elif sys.version_info[0] == 3 and sys.version_info[1] < 5: + raise Exception('Python 3 version < 3.5 is not supported') ################################################## @@ -50,6 +35,9 @@ standard_exclude = ('*.pyc', '*$py.class', '*~', '.*', '*.bak') standard_exclude_directories = ('.*', 'CVS', '_darcs', './build', './dist', 'EGG-INFO', '*.egg-info') +with open('README.rst') as f: + long_description = f.read() + def copy_messages(): themes_directory = os.path.join( @@ -100,7 +88,7 @@ def remove_old_files(self): tree = os.path.join(self.install_lib, 'nikola') try: shutil.rmtree(tree, ignore_errors=True) - except: + except Exception: pass @@ -111,17 +99,23 @@ class nikola_install(install): install.run(self) +class nikola_build_py(build_py): + def run(self): + expands_symlinks_for_windows() + build_py.run(self) + + setup(name='Nikola', - version='7.8.1', + version='8.1.2', description='A modular, fast, simple, static website and blog generator', - long_description=open('README.rst').read(), + long_description=long_description, author='Roberto Alsina and others', author_email='ralsina@netmanagers.com.ar', url='https://getnikola.com/', - packages=find_packages(exclude=('tests',)), + packages=find_packages(exclude=('tests', 'tests.*')), license='MIT', keywords='website, blog, static', - classifiers=('Development Status :: 5 - Production/Stable', + classifiers=['Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Environment :: Plugins', 'Environment :: Web Environment', @@ -134,23 +128,23 @@ setup(name='Nikola', 'Operating System :: POSIX', 'Operating System :: Unix', 'Programming Language :: Python', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'Topic :: Internet', 'Topic :: Internet :: WWW/HTTP', - 'Topic :: Text Processing :: Markup'), + 'Topic :: Text Processing :: Markup'], install_requires=dependencies, extras_require=extras, - tests_require=['pytest'], include_package_data=True, - cmdclass={'install': nikola_install, 'test': PyTest}, + python_requires='>=3.5', + cmdclass={'install': nikola_install, 'build_py': nikola_build_py}, data_files=[ ('share/doc/nikola', [ - 'docs/manual.txt', - 'docs/theming.txt', - 'docs/extending.txt']), + 'docs/manual.rst', + 'docs/theming.rst', + 'docs/extending.rst']), ('share/man/man1', ['docs/man/nikola.1.gz']), ], entry_points={ |
