walchko / build_utils

Tools to help build python 2 and 3 modules and make package development easier.
MIT License
0 stars 3 forks source link

Get some basic System info Example fails on macOS #1

Open seasonedgeek opened 3 years ago

seasonedgeek commented 3 years ago

On the command line, I tried running your "Get some basic system info" example as shown under the "Other" section on the "PyPi Build-Utils 0.3.2 Project" page (see https://pypi.org/project/build-utils/).

The example failed due to:

File "~/.pyenv/versions/3.9.0/lib/python3.9/site-packages/build_utils/info.py", line 29, in get_system
    arch = sys[2]
NameError: name 'sys' is not defined

The fix is simple. In get_system, I uncommented sys = platform.platform().split('-') on line 15. I ran the example again, and it worked: System(os='macos', arch='x86_64', kernel='19.6.0', os_version='10.15.7').

walchko commented 3 years ago

Thanks, that package was from long ago when I was trying to maintain python 2 and 3 versions of code. Now that 2 is dead (as far as I am concerned) I haven't used that code and migrated everything I currently maintain away from it. I should probably take that package down ... let me think about it.

Thanks again for reminding me it existed ... have a great day!

On Wed, Jan 20, 2021 at 5:25 PM Tom Stewart notifications@github.com wrote:

On the command line, I tried running your "Get some basic system info" example as shown under the "Other" section on the "PyPi Build-Utils 0.3.2 Project" page (see https://pypi.org/project/build-utils/).

The example failed due to:

File "~/.pyenv/versions/3.9.0/lib/python3.9/site-packages/build_utils/info.py", line 29, in get_system arch = sys[2] NameError: name 'sys' is not defined

The fix is simple. In get_system, I uncommented sys = platform.platform().split('-') on line 15. I ran the example again, and it worked: System(os='macos', arch='x86_64', kernel='19.6.0', os_version='10.15.7').

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/walchko/build_utils/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHALMEZTENFOX62NWZTFELS25J53ANCNFSM4WLOTDZA .