Skip to content

Commit

Permalink
Improved project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Jun 6, 2021
1 parent f4e6043 commit 074cbc9
Show file tree
Hide file tree
Showing 17 changed files with 52 additions and 55 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ jobs:
# TODO: add windows-latest
os: [ubuntu-latest, macos-latest]
python: ['3.6', '3.7', '3.8', '3.9', 'pypy3']
exclude:
# pypy3 currently fails to run on Windows
- os: windows-latest
python: pypy3
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand Down
8 changes: 5 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include __version__ README.md LICENSE flask_migrate/templates/flask/* \
flask_migrate/templates/flask-multidb/* tests/*

include README.md
include LICENSE
include src/flask_migrate/templates/flask/*
include src/flask_migrate/templates/flask-multidb/*
include tests/*
1 change: 0 additions & 1 deletion __version__

This file was deleted.

6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
]
build-backend = "setuptools.build_meta"
36 changes: 36 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[metadata]
name = Flask-Migrate
version = 3.0.2.dev0
author = Miguel Grinberg
author_email = miguel.grinberg@gmail.com
description = SQLAlchemy database migrations for Flask applications using Alembic.
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/miguelgrinberg/flask-migrate
project_urls =
Bug Tracker = https://github.com/miguelgrinberg/flask-migrate/issues
classifiers =
Environment :: Web Environment
Intended Audience :: Developers
Programming Language :: Python :: 3
License :: OSI Approved :: MIT License
Operating System :: OS Independent

[options]
zip_safe = False
include_package_data = True
package_dir =
= src
packages = find:
python_requires = >=3.6
install_requires =
Flask >= 0.9
Flask-SQLAlchemy >= 1.0
alembic >= 0.7

[options.packages.find]
where = src

[options.entry_points]
flask.commands =
db = flask_migrate.cli:db
48 changes: 2 additions & 46 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,47 +1,3 @@
"""
Flask-Migrate
--------------
import setuptools

SQLAlchemy database migrations for Flask applications using Alembic.
"""
from setuptools import setup


VERSION = open('__version__').read().strip()

setup(
name='Flask-Migrate',
version=VERSION,
url='http://github.com/miguelgrinberg/flask-migrate/',
license='MIT',
author='Miguel Grinberg',
author_email='miguelgrinberg50@gmail.com',
description=('SQLAlchemy database migrations for Flask applications '
'using Alembic'),
long_description=__doc__,
packages=['flask_migrate'],
zip_safe=False,
include_package_data=True,
platforms='any',
install_requires=[
'Flask>=0.9',
'Flask-SQLAlchemy>=1.0',
'alembic>=0.7'
],
entry_points={
'flask.commands': [
'db=flask_migrate.cli:db'
],
},
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)
setuptools.setup()
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
'sqlalchemy.url',
str(current_app.extensions['migrate'].db.get_engine().url).replace(
'%', '%%'))
bind_names = []
if current_app.config.get('SQLALCHEMY_BINDS') is not None:
bind_names = list(current_app.config['SQLALCHEMY_BINDS'].keys())
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def downgrade(engine_name):

<%
from flask import current_app
bind_names = []
if current_app.config.get('SQLALCHEMY_BINDS') is not None:
bind_names = list(current_app.config['SQLALCHEMY_BINDS'].keys())
else:
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ commands=
deps=
flake8
commands=
flake8 --exclude=".*" flask_migrate tests
flake8 --exclude=".*" src/flask_migrate tests

[testenv:docs]
changedir=docs
Expand Down

0 comments on commit 074cbc9

Please sign in to comment.