pytogo / portforward

Kubernetes Port-Forward Go-Edition For Python

Home Page:https://portforward.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not an issue but query

ns23k opened this issue · comments

How did you convert .go file into python runnable ???
I know there is a c file with python.h but I am still confused

It uses setuptools-golang(see requirements-dev.txt) in the setup.py.

    ext_modules=[
        Extension(
            "portforward", ["main.go"],
            py_limited_api=True, define_macros=[('Py_LIMITED_API', None)],
        )
    ]

When the Go compiler sees import "C" it will look around in the same folder for C files and tries also to compile them.

(TODO: Update the README. The README is quit empty at this point. )

Updated readme

Feel free to open the issue again when you have further questions.