Skip to content

Commit

Permalink
Merge pull request #4 from idwagner/feat-pyproject
Browse files Browse the repository at this point in the history
refactor(build): refactor build to use pyproject.toml
  • Loading branch information
idwagner authored Nov 24, 2022
2 parents 4b7d030 + 889b7de commit d34a0c9
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 68 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,5 @@ target/
.ipynb_checkpoints
openapi/python-build
.direnv
pynab/version.py
node_modules
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[build-system]
requires = [
"setuptools >= 48",
"setuptools_scm[toml] >= 4, <6",
"setuptools_scm_git_archive",
"wheel >= 0.29.0",
]
build-backend = 'setuptools.build_meta'

[tool.setuptools_scm]
write_to = "pynab/version.py"
git_describe_command = "git describe --dirty --tags --long --match v* --first-parent"
9 changes: 0 additions & 9 deletions requirements.txt

This file was deleted.

31 changes: 30 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,31 @@
[flake8]
max-line-length=99
max-line-length = 99

[metadata]
name = pynab
author = Isaac Wagner
url = https://github.com/idwagner/pynab

[options]
packages = find:
platforms = any
include_package_data = True
python_requires = >=3.7
install_requires =
certifi >= 14.05.14
six >= 1.10
python_dateutil >= 2.5.3
setuptools >= 21.0.0
urllib3 >= 1.15.1
click >= 7.1.2
tabulate >= 0.8.7
colorama >= 0.4.3
setup_requires =
setuptools_scm

[bdist_wheel]
universal = 1

[options.entry_points]
console_scripts =
pynab = pynab.cli:main
61 changes: 3 additions & 58 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,59 +1,4 @@
import setuptools

from setuptools import setup, find_packages
from subprocess import Popen, PIPE
import os
import re



PACKAGE = 'pynab'
AUTHOR = 'Isaac Wagner'
URL = 'https://github.com/idwagner/pynab'

ROOT = os.path.dirname(__file__)
VERSION='0.1.3'

def file_lines(filename):
with open(filename, 'r') as fdesc:
data = fdesc.read()
return data.split("\n")


setup(
# Basic info
name=PACKAGE,
version=VERSION,
author=AUTHOR,
url=URL,

# Packages and depencies
packages=find_packages(exclude=['tests*']),
install_requires=[
'certifi >= 14.05.14',
'future; python_version<="2.7"',
'six >= 1.10',
'python_dateutil >= 2.5.3',
'setuptools >= 21.0.0',
'urllib3 >= 1.15.1',
'click >= 7.1.2',
'tabulate >= 0.8.7',
'colorama >= 0.4.3',
],

# Data files
package_data={
PACKAGE : [
'templates/*.*',
'templates/license/*.*',
'templates/docs/*.*',
'templates/package/*.*'
],
},

# Scripts
entry_points={
'console_scripts': [
'ynab = pynab.cli:main'
],
},
)
if __name__ == "__main__":
setuptools.setup()

0 comments on commit d34a0c9

Please sign in to comment.