Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cython and Password Support #21

Merged
merged 27 commits into from
Oct 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fvid/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "0.0.2"
__version__ = "1.0.0"

27 changes: 25 additions & 2 deletions fvid/__main__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
import sys
from fvid import main

# leaving this here in case the try/except thing doesn't work
"""
import platform
import distro # to check linux distributions

try:
linux_distro = distro.linux_distribution()[0].lower()
except:
linux_distro = "n/a"

# fvid
if platform.system().lower() in ('linux', 'darwin') and linux_distro not in ('artix linux',):
# this used to work for every distro but something changed in the Cython/Password PR
from fvid import main
else:
# windows and artix linux need this because of something in the Cython/Password PR, unknown if more OSes need it
from fvid.fvid import main
"""

try:
from fvid import main
except:
from fvid.fvid import main

if __name__ == '__main__':
sys.exit(main())
sys.exit(main())
6 changes: 6 additions & 0 deletions fvid/cythonizer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#cython: language_level = 3
from distutils.core import Extension, setup
from Cython.Build import cythonize

ext = Extension(name="fvid_cython", sources=["fvid_cython.pyx"])
setup(ext_modules=cythonize(ext, compiler_directives={'language_level': 3, 'infer_types': True}))
Loading