diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..5079640 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,54 @@ +[build-system] +requires = ["flit_core >=3.2,<4"] +build-backend = "flit_core.buildapi" + +[tool.flit.module] +name = "slurm2sql" + +[project] +name = "slurm2sql" +authors = [{name = "Richard Darst"}] +readme = "README.rst" +license = {file = "LICENSE"} +# https://pypi.org/classifiers/ +classifiers = [ + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Development Status :: 4 - Beta", + "Environment :: Console", + "Intended Audience :: System Administrators", + "Topic :: Database", + "Topic :: System :: Clustering", + "Topic :: System :: Distributed Computing", + ] +keywords = ["slurm", "sqlite3"] +requires-python = ">=3.6" +dynamic = ["version", "description"] +dependencies = [ + "tabulate", +] + +[project.optional-dependencies] +test = [ + "pytest", +] + +[project.scripts] + slurm2sql = "slurm2sql:main" + slurm2sql-sacct = "slurm2sql:sacct_cli" + slurm2sql-seff = "slurm2sql:seff_cli" + +[project.urls] +Repository = "https://github.com/NordicHPC/slurm2sql" +#Documentation = "https://example.com/" + + +# https://flit.pypa.io/en/latest/upload.html +# flit build +# You need to configure a .pypirc file for test upload, or use environment variables: +# https://flit.pypa.io/en/latest/upload.html#using-pypirc +# flit publish --repository testpypi +# or: FLIT_INDEX_URL=https://test.pypi.org/legacy/ FLIT_USERNAME=xxx and FLIT_PASSWORD=xxx flit publish +# flit publish diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..9c558e3 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +. diff --git a/setup.py b/setup.py deleted file mode 100644 index f92d554..0000000 --- a/setup.py +++ /dev/null @@ -1,46 +0,0 @@ -import setuptools - -with open('slurm2sql.py') as pyfile: - pysource = {} - exec(pyfile.read(), pysource) - version = pysource['__version__'] - -with open("README.rst", "r") as f: - long_description = f.read() - -setuptools.setup( - name="slurm2sql", - version=version, - author="Richard Darst", - #author_email="", - description="Import Slurm accounting database from sacct to sqlite3 database", - long_description=long_description, - #long_description_content_type="text/markdown", ReST is default - url="https://github.com/NordicHPC/slurm2sql", - #packages=setuptools.find_packages(), - py_modules=["slurm2sql"], - keywords='slurm sqlite3', - python_requires='>= 3.6', # f-strings, if you need older then ask - install_requires = [ - "tabulate", - ], - entry_points={ - 'console_scripts': [ - 'slurm2sql=slurm2sql:main', - 'slurm2sql-sacct=slurm2sql:sacct_cli', - 'slurm2sql-seff=slurm2sql:seff_cli', - ], - }, - classifiers=[ - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - "Development Status :: 4 - Beta", - "Environment :: Console", - "Intended Audience :: System Administrators", - "Topic :: Database", - "Topic :: System :: Clustering", - "Topic :: System :: Distributed Computing", - ], -) diff --git a/slurm2sql.py b/slurm2sql.py index 35f3180..c866808 100644 --- a/slurm2sql.py +++ b/slurm2sql.py @@ -2,6 +2,9 @@ # pylint: disable=too-few-public-methods, missing-docstring +"""Import Slurm accounting database from sacct to sqlite3 database +""" + from __future__ import division, print_function import argparse