-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trying to mypyc
- Loading branch information
Showing
8 changed files
with
82 additions
and
796 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta" | |
|
||
[project] | ||
name = "py_ballisticcalc.exts" | ||
version = "2.0.4" | ||
version = "2.0.5a1" | ||
|
||
authors = [ | ||
{ name="o-murphy", email="[email protected]" }, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,13 @@ | |
# Copyright 2024 David Bookstaber (https://github.com/dbookstaber) | ||
|
||
[build-system] | ||
requires = ["setuptools", "wheel", "mypy[mypyc]"] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
|
||
[project] | ||
name = "py_ballisticcalc" | ||
version = "2.0.4" | ||
version = "2.0.5a1" | ||
|
||
authors = [ | ||
{ name="o-murphy", email="[email protected]" }, | ||
|
@@ -51,7 +51,7 @@ exclude = ["py_ballisticcalc_exts*"] | |
|
||
|
||
[project.optional-dependencies] | ||
exts = ['py_ballisticcalc.exts==2.0.4'] | ||
exts = ['py_ballisticcalc.exts==2.0.5a1'] | ||
charts = ['matplotlib', 'pandas'] | ||
dev = [ | ||
'jupyter', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,7 @@ | ||
# #!/usr/bin/env python | ||
#!/usr/bin/env python | ||
|
||
"""setup.py script for py_ballisticcalc library""" | ||
|
||
import warnings | ||
|
||
from setuptools import setup | ||
from mypyc.build import mypycify | ||
|
||
from distutils import ccompiler | ||
from distutils.errors import DistutilsError | ||
|
||
|
||
def check_compiler(): | ||
try: | ||
comp = ccompiler.new_compiler(dry_run=True) | ||
comp.compile([]) | ||
return True | ||
except DistutilsError as err: | ||
warnings.warn("Can't compile c-extension due to: {err}") | ||
warnings.warn("Continue installation in pure python mode") | ||
return False | ||
|
||
|
||
setup( | ||
ext_modules=mypycify( | ||
[ | ||
'py_ballisticcalc/', | ||
'--exclude', | ||
'py_ballisticcalc/__init__.py', | ||
'--exclude', | ||
'py_ballisticcalc/unit.py', | ||
'--exclude', | ||
'py_ballisticcalc/conditions.py', | ||
'--exclude', | ||
'py_ballisticcalc/munition.py', | ||
'--exclude', | ||
'py_ballisticcalc/trajectory_data.py', | ||
'--exclude', | ||
'py_ballisticcalc/example.py' | ||
], | ||
) if check_compiler() else None | ||
) | ||
setup() |