summaryrefslogtreecommitdiff
path: root/dev-python/flask-migrate
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-11-16 00:53:50 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-11-16 00:53:50 +0000
commit84dcbb8bcdcf5785ac3b24905c73ae4aa6bb781e (patch)
tree6f6b979013e5661ca4b3690bc9417307fdc169ce /dev-python/flask-migrate
parent57e62db33bb33adb6593a2be7b3a5990aaf01f56 (diff)
gentoo auto-resync : 16:11:2022 - 00:53:49
Diffstat (limited to 'dev-python/flask-migrate')
-rw-r--r--dev-python/flask-migrate/Manifest3
-rw-r--r--dev-python/flask-migrate/files/flask-migrate-4.0.0-system-venv.patch174
-rw-r--r--dev-python/flask-migrate/flask-migrate-4.0.0.ebuild15
3 files changed, 13 insertions, 179 deletions
diff --git a/dev-python/flask-migrate/Manifest b/dev-python/flask-migrate/Manifest
index 103199b74922..5fb993f2d394 100644
--- a/dev-python/flask-migrate/Manifest
+++ b/dev-python/flask-migrate/Manifest
@@ -1,6 +1,5 @@
-AUX flask-migrate-4.0.0-system-venv.patch 7397 BLAKE2B b0c170981a5f794dea2d0610df2851be744cc84fcecba8676e3adffd6b0c9d67e38aab207cb037cc729f0d9a44bb9b0d73343e88c83212c8c96e9fdad4055697 SHA512 bba926b422cbee45234cf1cc2cc0f1f9e0deedc149af5316187b7ddb7ef81754100e578b654030df6e2dbd574c7e13d6aff9538bb596ede2b1541e6445eb390b
DIST Flask-Migrate-3.1.0.gh.tar.gz 23752 BLAKE2B c668db793813658d1486dad662869b65fc5461bc7256e2ca42ca0d11da88fc3a40618946d03c7fd4f869d0eda21af2d9fe29f146dac4d364b4642c2cd26b6d96 SHA512 4e14fa04381c4217e78c3766c86891e88cd2ff4e2eb1ab3c3a51344cbbb192a083246e60cdb6cc4c1ef42bf8108420e3befa1b59c44fe0890e5202fd275b5805
DIST Flask-Migrate-4.0.0.gh.tar.gz 25945 BLAKE2B 79619b5b3a64b5f1e9ad887e58c135a122961527725b468ab0c95871e4b582d306706db2b3840d33b9150ef52e60a8bf1f3db516ee1434ffcd529df02bfd29d8 SHA512 199f97f87c6dbc1b3dce3cd85a8a2ce75155f359394e86dea66c9166aadc01bb03627afff20ff8478e12fd63147f28dd5898c8354e6a053d5908b1bb7f2cc192
EBUILD flask-migrate-3.1.0.ebuild 699 BLAKE2B bd490eb01477474374af0afe2a0a844b5401ef63f63c863e48be5b30bd01a7e421fa859e10c00d0408ab2bfeba5ee59f3fd3e9243000ec64142afaa24b8e2023 SHA512 d3819d640c8db1b64d43b0ad2993aa92d12caab0e15e90c42f2af1eae9b222d515ab55f797dae348e361bec2c40701842feef0b5debabf584bfe71138d4f8cc6
-EBUILD flask-migrate-4.0.0.ebuild 825 BLAKE2B aa64e9b104e764defca09a3afbd54e72f908e01c9cd4995a9b608be4f162426eca105433696ab269da5a6525e6dd85d93c06baf2b54f8676b6043e18ee2f5806 SHA512 f95bd7dce27ca2d81d028f0979b5b78217938d96418efc94742d30c4c76c2f5010dc443541efae8c30261f948ac353679c9a70ad43ce277828ec441d2342ae9f
+EBUILD flask-migrate-4.0.0.ebuild 990 BLAKE2B d1ca83d94fca15cd3036e3e4d0d8f3ab4015fd38a83df571f069d7d94e7e22ac569210c09f46e0afefc0b931174332fa01163d8ab00e0d109de383855bfc019e SHA512 5095b7fc2c2c08a1e07691edccaea4ee878a2041475898e6fcb1d90e069bab280d74547e654fecdd9aaa70b4dacdcbab5efca8f97872cda605263320fe817caf
MISC metadata.xml 341 BLAKE2B 36bf4bc39e85c6ef5a4b890960fb94146935404537b165ecd11265f307ad59c09be4fbbd9681d01e286cb6e0e7308431b617b0f9cb000d92bb4ee2076ecff8d5 SHA512 5d3cd5f90d06c26b8b996ffc9588e74cb4c98e10ce689cee3541a2012c3e62afe097ce9e66a8220e5ab8387401f6319753af3ec7b91c1ddaa0920315264e555f
diff --git a/dev-python/flask-migrate/files/flask-migrate-4.0.0-system-venv.patch b/dev-python/flask-migrate/files/flask-migrate-4.0.0-system-venv.patch
deleted file mode 100644
index 47899909d1c7..000000000000
--- a/dev-python/flask-migrate/files/flask-migrate-4.0.0-system-venv.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-diff --git a/tests/test_custom_template.py b/tests/test_custom_template.py
-index fe55fe4..ade8388 100644
---- a/tests/test_custom_template.py
-+++ b/tests/test_custom_template.py
-@@ -3,12 +3,16 @@ import shutil
- import unittest
- import subprocess
- import shlex
-+import sys
-
-
--def run_cmd(app, cmd):
-- """Run a command and return a tuple with (stdout, stderr, exit_code)"""
-+def run_flask(app, cmd):
-+ """
-+ Run a flask command and return a tuple with (stdout, stderr, exit_code)
-+ """
- os.environ['FLASK_APP'] = app
-- process = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,
-+ process = subprocess.Popen([sys.executable, '-m', 'flask'] +
-+ shlex.split(cmd), stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- (stdout, stderr) = process.communicate()
- print('\n$ ' + cmd)
-@@ -54,11 +58,11 @@ class TestMigrate(unittest.TestCase):
- self.assertTrue(isinstance(v, int))
-
- def test_migrate_upgrade(self):
-- (o, e, s) = run_cmd('app.py', 'flask db init -t ./custom_template')
-+ (o, e, s) = run_flask('app.py', 'db init -t ./custom_template')
- self.assertTrue(s == 0)
-- (o, e, s) = run_cmd('app.py', 'flask db migrate')
-+ (o, e, s) = run_flask('app.py', 'db migrate')
- self.assertTrue(s == 0)
-- (o, e, s) = run_cmd('app.py', 'flask db upgrade')
-+ (o, e, s) = run_flask('app.py', 'db upgrade')
- self.assertTrue(s == 0)
-
- from .app import app, db, User
-diff --git a/tests/test_migrate.py b/tests/test_migrate.py
-index 08e60c7..3f22d38 100644
---- a/tests/test_migrate.py
-+++ b/tests/test_migrate.py
-@@ -3,12 +3,16 @@ import shutil
- import unittest
- import subprocess
- import shlex
-+import sys
-
-
--def run_cmd(app, cmd):
-- """Run a command and return a tuple with (stdout, stderr, exit_code)"""
-+def run_flask(app, cmd):
-+ """
-+ Run a flask command and return a tuple with (stdout, stderr, exit_code)
-+ """
- os.environ['FLASK_APP'] = app
-- process = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,
-+ process = subprocess.Popen([sys.executable, '-m', 'flask'] +
-+ shlex.split(cmd), stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- (stdout, stderr) = process.communicate()
- print('\n$ ' + cmd)
-@@ -54,11 +58,11 @@ class TestMigrate(unittest.TestCase):
- self.assertTrue(isinstance(v, int))
-
- def test_migrate_upgrade(self):
-- (o, e, s) = run_cmd('app.py', 'flask db init')
-+ (o, e, s) = run_flask('app.py', 'db init')
- self.assertTrue(s == 0)
-- (o, e, s) = run_cmd('app.py', 'flask db migrate')
-+ (o, e, s) = run_flask('app.py', 'db migrate')
- self.assertTrue(s == 0)
-- (o, e, s) = run_cmd('app.py', 'flask db upgrade')
-+ (o, e, s) = run_flask('app.py', 'db upgrade')
- self.assertTrue(s == 0)
-
- from .app import app, db, User
-@@ -67,11 +71,11 @@ class TestMigrate(unittest.TestCase):
- db.session.commit()
-
- def test_custom_directory(self):
-- (o, e, s) = run_cmd('app_custom_directory.py', 'flask db init')
-+ (o, e, s) = run_flask('app_custom_directory.py', 'db init')
- self.assertTrue(s == 0)
-- (o, e, s) = run_cmd('app_custom_directory.py', 'flask db migrate')
-+ (o, e, s) = run_flask('app_custom_directory.py', 'db migrate')
- self.assertTrue(s == 0)
-- (o, e, s) = run_cmd('app_custom_directory.py', 'flask db upgrade')
-+ (o, e, s) = run_flask('app_custom_directory.py', 'db upgrade')
- self.assertTrue(s == 0)
-
- from .app_custom_directory import app, db, User
-@@ -80,11 +84,11 @@ class TestMigrate(unittest.TestCase):
- db.session.commit()
-
- def test_custom_directory_path(self):
-- (o, e, s) = run_cmd('app_custom_directory_path.py', 'flask db init')
-+ (o, e, s) = run_flask('app_custom_directory_path.py', 'db init')
- self.assertTrue(s == 0)
-- (o, e, s) = run_cmd('app_custom_directory_path.py', 'flask db migrate')
-+ (o, e, s) = run_flask('app_custom_directory_path.py', 'db migrate')
- self.assertTrue(s == 0)
-- (o, e, s) = run_cmd('app_custom_directory_path.py', 'flask db upgrade')
-+ (o, e, s) = run_flask('app_custom_directory_path.py', 'db upgrade')
- self.assertTrue(s == 0)
-
- from .app_custom_directory_path import app, db, User
-@@ -93,13 +97,13 @@ class TestMigrate(unittest.TestCase):
- db.session.commit()
-
- def test_compare_type(self):
-- (o, e, s) = run_cmd('app_compare_type1.py', 'flask database init')
-+ (o, e, s) = run_flask('app_compare_type1.py', 'database init')
- self.assertTrue(s == 0)
-- (o, e, s) = run_cmd('app_compare_type1.py', 'flask database migrate')
-+ (o, e, s) = run_flask('app_compare_type1.py', 'database migrate')
- self.assertTrue(s == 0)
-- (o, e, s) = run_cmd('app_compare_type1.py', 'flask database upgrade')
-+ (o, e, s) = run_flask('app_compare_type1.py', 'database upgrade')
- self.assertTrue(s == 0)
-- (o, e, s) = run_cmd('app_compare_type2.py', 'flask database migrate')
-+ (o, e, s) = run_flask('app_compare_type2.py', 'database migrate')
- self.assertTrue(s == 0)
- self.assertTrue(b'Detected type change from VARCHAR(length=128) '
- b'to String(length=10)' in e)
-diff --git a/tests/test_multidb_migrate.py b/tests/test_multidb_migrate.py
-index 1a40c18..e65106d 100644
---- a/tests/test_multidb_migrate.py
-+++ b/tests/test_multidb_migrate.py
-@@ -4,12 +4,16 @@ import unittest
- import subprocess
- import shlex
- import sqlite3
-+import sys
-
-
--def run_cmd(app, cmd):
-- """Run a command and return a tuple with (stdout, stderr, exit_code)"""
-+def run_flask(app, cmd):
-+ """
-+ Run a flask command and return a tuple with (stdout, stderr, exit_code)
-+ """
- os.environ['FLASK_APP'] = app
-- process = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,
-+ process = subprocess.Popen([sys.executable, '-m', 'flask'] +
-+ shlex.split(cmd), stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- (stdout, stderr) = process.communicate()
- print('\n$ ' + cmd)
-@@ -43,11 +47,11 @@ class TestMigrate(unittest.TestCase):
- pass
-
- def test_multidb_migrate_upgrade(self):
-- (o, e, s) = run_cmd('app_multidb.py', 'flask db init --multidb')
-+ (o, e, s) = run_flask('app_multidb.py', 'db init --multidb')
- self.assertTrue(s == 0)
-- (o, e, s) = run_cmd('app_multidb.py', 'flask db migrate')
-+ (o, e, s) = run_flask('app_multidb.py', 'db migrate')
- self.assertTrue(s == 0)
-- (o, e, s) = run_cmd('app_multidb.py', 'flask db upgrade')
-+ (o, e, s) = run_flask('app_multidb.py', 'db upgrade')
- self.assertTrue(s == 0)
-
- # ensure the tables are in the correct databases
-@@ -75,7 +79,7 @@ class TestMigrate(unittest.TestCase):
- db.session.commit()
-
- # ensure the downgrade works
-- (o, e, s) = run_cmd('app_multidb.py', 'flask db downgrade')
-+ (o, e, s) = run_flask('app_multidb.py', 'db downgrade')
- self.assertTrue(s == 0)
-
- conn1 = sqlite3.connect('app1.db')
diff --git a/dev-python/flask-migrate/flask-migrate-4.0.0.ebuild b/dev-python/flask-migrate/flask-migrate-4.0.0.ebuild
index 7bcae0f8c1f8..55f3c685a9f2 100644
--- a/dev-python/flask-migrate/flask-migrate-4.0.0.ebuild
+++ b/dev-python/flask-migrate/flask-migrate-4.0.0.ebuild
@@ -32,6 +32,15 @@ RDEPEND="
distutils_enable_tests unittest
-PATCHES=(
- "${FILESDIR}"/${P}-system-venv.patch
-)
+python_test() {
+ local -x PATH=${T}/bin:${PATH}
+
+ mkdir -p "${T}"/bin || die
+ cat > "${T}"/bin/flask <<-EOF || die
+ #!/bin/sh
+ exec ${EPYTHON} -m flask "\${@}"
+ EOF
+ chmod +x "${T}"/bin/flask || die
+
+ eunittest
+}