Skip to content

Commit

Permalink
Merge pull request #458 from mshriver/move-to-hatch
Browse files Browse the repository at this point in the history
Migrate to hatch
  • Loading branch information
mshriver authored Nov 22, 2022
2 parents 0f994f9 + 0cf856e commit 036f85a
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 100 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@ jobs:
sudo apt-get install -y libgnutls28-dev libcurl4-openssl-dev libssl-dev
# Uninstall pycurl - its likely not installed, but in case the ubuntu-latest packages change
# then compile and install it with PYCURL_SSL_LIBRARY set to openssl
pip install -U pip
pip install -U pip wheel
pip uninstall -y pycurl
pip install --compile --no-cache-dir pycurl
pip install -Ur requirements-test.txt --upgrade-strategy eager
pip install -U -e .[test]
# coming soon
#- name: Pre Commit Checks
# uses: pre-commit/action@v3.0.0
# with:
# extra_args: --show-diff-on-failure

- name: Run Unit Tests
run: py.test tests/ -v --cov wrapanapi

- name: Analysis (git diff)
if: failure()
run: git diff
12 changes: 5 additions & 7 deletions .github/workflows/release_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
sudo apt-get install -y libgnutls28-dev libcurl4-openssl-dev libssl-dev
# Uninstall pycurl - its likely not installed, but in case the ubuntu-latest packages change
# then compile and install it with PYCURL_SSL_LIBRARY set to openssl
pip install -U pip
pip install -U pip wheel
pip uninstall -y pycurl
pip install --compile --no-cache-dir pycurl
pip install -Ur requirements-test.txt --upgrade-strategy eager
pip install -U .[test]
- name: Run Unit Tests
run: py.test tests/ -v --cov wrapanapi
Expand All @@ -56,11 +56,9 @@ jobs:

- name: Setup and Build
run: |
sudo apt update
pip install -U pip
pip install setuptools_scm wheel twine
python setup.py sdist bdist_wheel
python -m twine check dist/*
pip install -U pip wheel twine hatch
hatch build
twine check dist/*
- name: Release to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
85 changes: 85 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[tool.hatch.version]
source = "vcs"

[tool.hatch.build.targets.sdist]
include = [
"/wrapanapi",
]

[tool.hatch.build.targets.wheel]
packages = [
"/wrapanapi",
]

[project.urls]
"Source" = "https://github.com/RedHatQE/wrapanapi"

[project]
name = "wrapanapi"
dynamic = ["version"]
readme = "README.rst"
license-files = { paths = ["LICENSE"] }
authors = [
{ name = "Peter Savage" },
]
maintainers = [
{ name = "Jitendra Yejare" },
{ name = "Mike Shriver" },
]
keywords = [
"distutils",
"hatch",
"hyperscaler",
"api",
"cloud",
]
dependencies = [
"azure-storage-common>=1.0",
"azure<5.0.0",
"boto",
"boto3",
"botocore",
"cached_property",
"dateparser",
"fauxfactory",
"google-api-python-client",
"google-compute-engine",
"inflection",
"lxml",
"miq-version",
"oauth2client",
"openshift==0.3.4",
"ovirt-engine-sdk-python~=4.3",
"packaging",
"py3winrm==0.0.1",
"python-cinderclient",
"python-glanceclient",
"python-heatclient",
"python-ironicclient",
"python-keystoneclient",
"python-neutronclient==6.12.0",
"python-novaclient==7.1.2",
"python-swiftclient",
"pyvcloud==19.1.2",
"pyvmomi>=6.5.0.2017.5.post1",
"redfish-client==0.1.0",
"requests",
"tzlocal",
"vspk==5.3.2",
"wait_for",
"websocket_client",
]

[project.optional-dependencies]
test = [
"mock",
"pytest",
"pytest-cov",
"pytest-mock",
"pytest-variables",
"coveralls",
]
11 changes: 0 additions & 11 deletions requirements-test.txt

This file was deleted.

70 changes: 0 additions & 70 deletions setup.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions setup.py

This file was deleted.

0 comments on commit 036f85a

Please sign in to comment.