Skip to content

Commit

Permalink
setup: move var out of __main__
Browse files Browse the repository at this point in the history
  • Loading branch information
YoSTEALTH committed Apr 22, 2024
1 parent 2751459 commit a0df320
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@
from Cython.Distutils import Extension


uring = 'uring-ffi'
tmpdir = mkdtemp()
threads = cpu_count()
lib = join(tmpdir, 'libs/liburing')
libsrc = join(lib, 'src')
libinc = join(libsrc, 'include')

# compiler options
Options.annotate = False
Options.fast_fail = True
Options.docstrings = True
Options.warning_errors = False


class BuildExt(build_ext):

def initialize_options(self):
Expand Down Expand Up @@ -38,20 +52,7 @@ def build_extensions(self):


if __name__ == '__main__':
# uring = 'uring'
uring = 'uring-ffi'
tmpdir = mkdtemp()
threads = cpu_count()
# compiler options
Options.annotate = False
Options.fast_fail = True
Options.docstrings = True
Options.warning_errors = False

try:
lib = join(tmpdir, 'libs/liburing')
libsrc = join(lib, 'src')
libinc = join(libsrc, 'include')
extension = [Extension(name='liburing.*', # where the `.so` will be saved.
sources=['src/liburing/*.pyx'],
language='c',
Expand Down

0 comments on commit a0df320

Please sign in to comment.