Skip to content

Commit

Permalink
Cibuildwheel/fix the pipeline for ga (#165)
Browse files Browse the repository at this point in the history
* Update setup.py

- remove deprecated stuff that isn't needed anymore.

* Attempt a Fix

- possible fix for the broken ci system.

* #!/usr/bin/env python3

- adding #!/usr/bin/env python3 to force python3

* Another Possible Fix

- trying this live in the CI to see if it works. ATM I can't get a local run to work for me.

* Update build_and_publish_to_test_pypi.yml

- oops, making sure it runs lol.
check-source-changes

* Update pyproject.toml

- boom. these work on my local build.

* Update build_and_publish_to_test_pypi.yml

- undoing workflow changes. back to the orignal.

* Raw

- remove raw html, pypi doesn't like it.
  • Loading branch information
carlkidcrypto authored Sep 1, 2024
1 parent 555f617 commit 5305b88
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 34 deletions.
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ Why Another Library?
How to Support This Project?
----------------------------

.. raw:: html

<a href="https://www.buymeacoffee.com/carlkidcrypto" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
.. image:: https://github.com/carlkidcrypto/ezsnmp/blob/main/images/buy_me_a_coffee.png
:alt: Buy Me A Coffee.

`Use this link to buy me a coffee! <https://www.buymeacoffee.com/carlkidcrypto>`__

Quick Start
-----------
Expand Down
2 changes: 2 additions & 0 deletions ezsnmp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python3

from .ez import ( # noqa
snmp_get,
snmp_set,
Expand Down
2 changes: 2 additions & 0 deletions ezsnmp/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python3

from __future__ import unicode_literals


Expand Down
2 changes: 2 additions & 0 deletions ezsnmp/ez.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python3

from __future__ import unicode_literals, absolute_import

from typing import Union, List, Tuple, Any, overload, Optional
Expand Down
2 changes: 2 additions & 0 deletions ezsnmp/helpers.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python3

from __future__ import unicode_literals

from typing import Optional, Tuple, overload
Expand Down
2 changes: 2 additions & 0 deletions ezsnmp/session.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python3

from __future__ import unicode_literals, absolute_import

import os
Expand Down
2 changes: 2 additions & 0 deletions ezsnmp/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python3

from __future__ import unicode_literals, absolute_import
from typing import Optional, Union

Expand Down
2 changes: 2 additions & 0 deletions ezsnmp/variables.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python3

from __future__ import unicode_literals, absolute_import

from typing import Optional
Expand Down
Binary file added images/buy_me_a_coffee.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.cibuildwheel]
manylinux-x86_64-image = "manylinux2014"
skip = "cp27-* cp36-* cp37-* pp37-*"
skip = "cp27-* cp36-* cp37-* pp27-* pp36-* pp37-*"

[[tool.cibuildwheel.overrides]]
select = "*manylinux_2_24*"
Expand Down Expand Up @@ -34,4 +34,11 @@ before-all = """brew update;
echo 'export PATH="/usr/local/opt/net-snmp/sbin:$PATH"' >> ~/.zshrc;
export PATH="/usr/local/opt/net-snmp/sbin:$PATH";"""
archs = ["x86_64"]
repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"

[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools == 72.1.0",
"wheel == 0.43.0",
]
4 changes: 0 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ classifiers =

[options]
packages = ezsnmp
tests_require =
pytest-cov
pytest-sugar
pytest

[tool:pytest]
addopts = -s --cov=ezsnmp --cov-report=term-missing
Expand Down
28 changes: 3 additions & 25 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env python3

from subprocess import check_output, CalledProcessError
from sys import argv, platform, exit
from sys import argv, platform
from shlex import split as s_split

import sysconfig
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext as BuildCommand
from setuptools.command.test import test as TestCommand
import setuptools.command.build as build
from setuptools import dist

Expand Down Expand Up @@ -122,27 +123,6 @@
print(f"platform: {platform}")


# Setup the py.test class for use with the test command
class PyTest(TestCommand):
user_options = [("pytest-args=", "a", "Arguments to pass to py.test")]

def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []

def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True

def run_tests(self):
# Import here, cause outside the eggs aren't loaded
import pytest

errno = pytest.main(self.pytest_args)
exit(errno)


class RelinkLibraries(BuildCommand):
"""Fix dylib path for macOS
Expand Down Expand Up @@ -196,8 +176,6 @@ def run(self):


setup(
tests_require=["pytest-cov", "pytest-sugar", "pytest"],
cmdclass={"test": PyTest, "build_ext": RelinkLibraries},
ext_modules=[
Extension(
"ezsnmp.interface",
Expand Down

1 comment on commit 5305b88

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valgrind Comment

Python Version Results OS Version
3.8 sh ==8284== LEAK SUMMARY: ==8284== definitely lost: 112 bytes in 7 blocks ==8284== indirectly lost: 0 bytes in 0 blocks ==8284== possibly lost: 74,448 bytes in 117 blocks ==8284== still reachable: 2,169,753 bytes in 1,178 blocks ==8284== suppressed: 74,488 bytes in 178 blocks ==8284== Reachable blocks (those to which a pointer was found) are not shown. ==8284== To see them, rerun with: --leak-check=full --show-leak-kinds=all ubuntu-latest
3.9 sh ==8271== LEAK SUMMARY: ==8271== definitely lost: 112 bytes in 7 blocks ==8271== indirectly lost: 0 bytes in 0 blocks ==8271== possibly lost: 307,205 bytes in 467 blocks ==8271== still reachable: 2,420,988 bytes in 1,438 blocks ==8271== suppressed: 68,037 bytes in 163 blocks ==8271== Reachable blocks (those to which a pointer was found) are not shown. ==8271== To see them, rerun with: --leak-check=full --show-leak-kinds=all ubuntu-latest
3.10 sh ==8272== LEAK SUMMARY: ==8272== definitely lost: 112 bytes in 7 blocks ==8272== indirectly lost: 0 bytes in 0 blocks ==8272== possibly lost: 265,020 bytes in 396 blocks ==8272== still reachable: 1,768,372 bytes in 1,370 blocks ==8272== suppressed: 68,403 bytes in 163 blocks ==8272== Reachable blocks (those to which a pointer was found) are not shown. ==8272== To see them, rerun with: --leak-check=full --show-leak-kinds=all ubuntu-latest
3.11 sh ==8184== LEAK SUMMARY: ==8184== definitely lost: 6,544 bytes in 14 blocks ==8184== indirectly lost: 13,339 bytes in 14 blocks ==8184== possibly lost: 4,232 bytes in 6 blocks ==8184== still reachable: 10,696,761 bytes in 141,008 blocks ==8184== suppressed: 69,898 bytes in 166 blocks ==8184== Reachable blocks (those to which a pointer was found) are not shown. ==8184== To see them, rerun with: --leak-check=full --show-leak-kinds=all ubuntu-latest
3.12 sh ==8222== LEAK SUMMARY: ==8222== definitely lost: 3,984 bytes in 11 blocks ==8222== indirectly lost: 1,032 bytes in 2 blocks ==8222== possibly lost: 6,220 bytes in 8 blocks ==8222== still reachable: 10,607,049 bytes in 140,961 blocks ==8222== of which reachable via heuristic: ==8222== newarray : 536 bytes in 1 blocks ==8222== suppressed: 68,382 bytes in 163 blocks ==8222== Reachable blocks (those to which a pointer was found) are not shown. ==8222== To see them, rerun with: --leak-check=full --show-leak-kinds=all ubuntu-latest

Please sign in to comment.