Skip to content

Commit

Permalink
Fix packaging issue #2
Browse files Browse the repository at this point in the history
  • Loading branch information
skasberger committed Jun 21, 2022
1 parent c9422da commit 4774f0a
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 57 deletions.
Empty file added CHANGELOG.rst
Empty file.
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta:__legacy__"

[project]
dependencies = [
"pyDataverse==0.3.1",
"pytest-selenium==2.0.1",
"typer==0.3.2",
'pydantic==1.8.2,extras=["dotenv"]'
]
35 changes: 35 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
[metadata]
name = dvtests
version = attr: src.dvtests.__version__
author = Stefan Kasberger
author_email = mail@stefankasberger.at
url = https://github.com/gdcc/dataverse_tests
description = Dataverse tests
long_description = file: README.md
long_description_content_type = text/markdown
license_files = LICENSE.txt
keywords = dataverse, testing, selenium, pyDataverse
license = BSD 3-Clause License
classifiers =
Development Status :: 3 - Alpha
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Intended Audience :: Developers
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3 :: Only
Natural Language :: English

[options]
packages = find:
package_dir =
= src

[options.packages.find]
where = src

[options.entry_points]
console_scripts =
dvtests = src.dvtests.main:app

[tool:pytest]
testpaths = tests
Expand Down
60 changes: 3 additions & 57 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,59 +1,5 @@
import re

#!/usr/bin/env python
import setuptools


with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()


def find_version(*file_paths):
"""Find package version from file."""
with open("src/dvtests/__init__.py", "r", encoding="utf-8") as fh:
version_file = fh.read()
version_match = re.search(
r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M,
)
if version_match:
return version_match.group(1)

raise RuntimeError("Unable to find version string.")


setuptools.setup(
version=find_version("src", "dataverse_tests", "__init__.py"),
author="Stefan Kasberger",
author_email="mail@stefankasberger.at",
description="Dataverse tests",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/gdcc/dataverse_tests",
project_urls={
"Issue Tracker": "https://github.com/gdcc/dataverse_tests/issues",
"Changelog": "https://github.com/gdcc/dataverse_tests/CHANGELOG.rst",
"Source": "https://github.com/gdcc/dataverse_tests/",
},
classifiers=[
# How mature is this project? Common values are
# 2 - Pre-Alpha
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3 :: Only",
"Natural Language :: English",
],
package_dir={"": "src"},
packages=setuptools.find_packages(where="src"),
python_requires=">=3.6",
keywords=["dataverse", "testing", "selenium", "pyDataverse"],
)
if __name__ == "__main__":
setuptools.setup()

0 comments on commit 4774f0a

Please sign in to comment.