56 lines
2.1 KiB
Python
56 lines
2.1 KiB
Python
## -*- encoding: utf-8 -*-
|
|
import os
|
|
import sys
|
|
from setuptools import setup
|
|
from codecs import open # To open the README file with proper encoding
|
|
from setuptools.command.test import test as TestCommand # for tests
|
|
|
|
|
|
# Get information from separate files (README, VERSION)
|
|
def readfile(filename):
|
|
with open(filename, encoding='utf-8') as f:
|
|
return f.read()
|
|
|
|
# For the tests
|
|
class SageTest(TestCommand):
|
|
def run_tests(self):
|
|
errno = os.system("sage -t --force-lib vector_bundle")
|
|
if errno != 0:
|
|
sys.exit(1)
|
|
|
|
# For the tests
|
|
class SageDebug(TestCommand):
|
|
def run_tests(self):
|
|
errno = os.system("sage -t --debug --force-lib vector_bundle")
|
|
if errno != 0:
|
|
sys.exit(1)
|
|
|
|
setup(
|
|
name = "vector_bundle",
|
|
version = readfile("VERSION").strip(), # the VERSION file is shared with the documentation
|
|
description='A sage package implementing vector bundles on algebraic curves using only function fields',
|
|
long_description = readfile("README.md"),
|
|
long_description_content_type="text/markdown",
|
|
url='https://git.disroot.org/montessiel/vector-bundles-sagemath',
|
|
author='Mickaël Montessinos',
|
|
author_email='mickael.montessinos@mif.vu.lt', # choose a main contact email
|
|
license='GPLv2+', # This should be consistent with the LICENCE file
|
|
classifiers=[
|
|
# How mature is this project? Common values are
|
|
# 3 - Alpha
|
|
# 4 - Beta
|
|
# 5 - Production/Stable
|
|
'Development Status :: 3 - Alpha',
|
|
'Intended Audience :: Science/Research',
|
|
'Topic :: Software Development :: Build Tools',
|
|
'Topic :: Scientific/Engineering :: Mathematics',
|
|
'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)',
|
|
'Programming Language :: Python :: 3.7',
|
|
], # classifiers list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
|
keywords = "Algebraic Geometry Number Theory Curves Vector Bundles",
|
|
packages = ['vector_bundle'],
|
|
cmdclass = {'test': SageTest, 'debug': SageDebug}, # adding a special setup command for tests and debugs
|
|
setup_requires = ['sage-package'],
|
|
install_requires = ['sage-package', 'sphinx'],
|
|
)
|