Re: [PATCH] setup.py: fix string <-> int comparison

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry also should have specified this is trace-cruncher specific

- John

On 4/8/2022 5:21 PM, John 'Warthog9' Hawley (VMware) wrote:
Slightly older (read: python 3.6ish) seem to treat the language_level
object as an integer all the time.  If you end up passing the version
in as a string (with the 's) it ends up doing a string to int comparison
and throws an error.  Newer python will deal with the non-matching
typing fine and this isn't an issue there.

So minor fix to be slightly more correct with relation to older python

Signed-off-by: John 'Warthog9' Hawley (VMware) <warthog9@xxxxxxxxxxxxxx>
---
  setup.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 21c627f..58561cf 100644
--- a/setup.py
+++ b/setup.py
@@ -74,7 +74,7 @@ def main():
                            sources=['src/ftracepy.c', 'src/ftracepy-utils.c'],
                            libraries=['traceevent', 'tracefs'])
- cythonize('src/npdatawrapper.pyx', language_level = '3')
+    cythonize('src/npdatawrapper.pyx', language_level = 3)
      module_data = extension(name='tracecruncher.npdatawrapper',
                              sources=['src/npdatawrapper.c'],
                              libraries=['kshark'])



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux