Skip to content

Commit

Permalink
update setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bouttier committed May 18, 2021
1 parent 85701d1 commit fc6ddeb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include VERSION
include README.md
include requirements.in
include tox.ini
2 changes: 2 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
flask
flask-sqlalchemy
38 changes: 16 additions & 22 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,39 +1,33 @@
# coding: utf-8

# Do not import unicode_literals it generate an error when install module with pip
from __future__ import (print_function,
absolute_import, division)

import re
import setuptools
from pathlib import Path


def get_version(path="./VERSION"):
""" Return the version of by with regex intead of importing it"""
version_number = open(path, "rt").read()
return version_number
root_dir = Path(__file__).absolute().parent
with (root_dir / 'VERSION').open() as f:
version = f.read()
with (root_dir / 'README.md').open() as f:
long_description = f.read()
with (root_dir / 'requirements.in').open() as f:
requirements = f.read().splitlines()


setuptools.setup(
name='utils-flask-sqlalchemy',
version=get_version(),
version=version,
description="Python lib of tools for Flask and SQLAlchemy",
long_description=open('README.md', encoding="utf-8").read().strip(),
author="Les parcs nationaux de France",
long_description=long_description,
long_description_content_type='text/markdown',
maintainer='Parcs nationaux des Écrins et des Cévennes',
maintainer_email='[email protected]',
url='https://github.com/PnX-SI/Utils-Flask-SQLAlchemy',
packages=setuptools.find_packages('src'),
package_dir={'': 'src'},
install_requires=list(open('requirements.txt', 'r')),
include_package_data=True,
zip_safe=False,
keywords='ww',
install_requires=requirements,
tests_require=['geoalchemy2', 'jsonschema'],
classifiers=['Development Status :: 1 - Planning',
'Intended Audience :: Developers',
'Natural Language :: English',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Operating System :: OS Independent'],
)

0 comments on commit fc6ddeb

Please sign in to comment.