Skip to content

Commit b7a5e84

Browse files
committed
Update .travis.yml and setup, added pyproject.toml, move source files into src directory
1 parent 5a14840 commit b7a5e84

19 files changed

+48
-62
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ before_install:
1616

1717
install:
1818
- pip install -r requirements.txt
19-
- pip install .
19+
- pip install . --use-feature=in-tree-build
2020
- pip install pytest
2121
- pip install codecov
2222
# before_script:
@@ -25,7 +25,7 @@ install:
2525
# - ./cc-test-reporter before-build
2626
script:
2727
# - pytest tests
28-
- coverage run --source=sqlalchemyseed/ -m pytest tests
28+
- coverage run --source=src/ -m pytest tests
2929
# after_script:
3030
# - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
3131
after_success:

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[build-system]
2+
requires = [
3+
"setuptools>=42",
4+
"wheel"
5+
]
6+
build-backend = "setuptools.build_meta"

setup.cfg

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ author = Jedy Matt Tabasco
88
author_email= jedymatt@gmail.com
99
license = MIT
1010
license_file = LICENSE
11-
python_requires= >=3.6
1211
classifiers =
1312
License :: OSI Approved :: MIT License
1413
Programming Language :: Python :: 3.6
@@ -18,4 +17,19 @@ classifiers =
1817
project_urls =
1918
Source = https://github.com/jedymatt/sqlalchemyseed
2019
Tracker = https://github.com/jedymatt/sqlalchemyseed/issues
21-
keywords = sqlalchemy, orm, seed, seeder, json, yaml
20+
keywords = sqlalchemy, orm, seed, seeder, json, yaml
21+
22+
[options]
23+
packages = find:
24+
package_dir =
25+
=src
26+
install_requires =
27+
SQLAlchemy>=1.4
28+
python_requires= >=3.6
29+
30+
[options.packages.find]
31+
where = src
32+
33+
[options.extras_require]
34+
yaml =
35+
PyYAML>=5.4

setup.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
1+
import os
12
import re
3+
import logging
24

35
from setuptools import setup
46

57
with open("README.md", encoding="utf-8") as f:
68
LONG_DESCRIPTION = f.read()
79

810

9-
with open('sqlalchemyseed/__init__.py', 'r') as f:
11+
with open(os.path.join('src', '__init__.py'), 'r') as f:
1012
pattern = r"^__version__ = ['\"]([^'\"]*)['\"]"
1113
VERSION = re.search(pattern, f.read(), re.MULTILINE).group(1)
1214

1315

14-
packages = ['sqlalchemyseed']
16+
# packages = ['src']
1517

16-
install_requires = [
17-
'SQLAlchemy>=1.4',
18-
]
18+
# install_requires = [
19+
# 'SQLAlchemy>=1.4',
20+
# ]
1921

20-
extras_require = {
21-
'yaml': ['PyYAML>=5.4']
22-
}
22+
# extras_require = {
23+
# 'yaml': ['PyYAML>=5.4']
24+
# }
2325

2426

2527
setup(
@@ -32,10 +34,10 @@
3234
# author='jedymatt',
3335
# author_email='jedymatt@gmail.com',
3436
# license='MIT',
35-
packages=packages,
37+
# packages=packages,
3638
# package_data={'sqlalchemyseed': ['res/*']},
37-
install_requires=install_requires,
38-
extras_require=extras_require,
39+
# install_requires=install_requires,
40+
# extras_require=extras_require,
3941
# python_requires='>=3.6',
4042
# project_urls={
4143
# 'Source': 'https://github.com/jedymatt/sqlalchemyseed',
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@
2626
import json
2727
import sys
2828

29-
3029
from . import validator
3130

32-
3331
try:
3432
import yaml
3533
except ModuleNotFoundError:

0 commit comments

Comments
 (0)