Skip to content
Snippets Groups Projects
Commit f5faa00d authored by BoukeJisse Jung's avatar BoukeJisse Jung Committed by Tamas Gal
Browse files

Add geane and pdf evaluator

parent 4e9854c9
No related branches found
Tags v3.4.0
1 merge request!7Add geane and pdf evaluator
Showing
with 141 additions and 53 deletions
*.so
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*.egg-info
*.pyxbldc
# C extensions
*.so
# Distribution / packaging
build/
venv/
dist/
_build
_generate
build
venv
jppy/__init__.py
jppy/version.py
pip-wheel-metadata
scratch
pdfs
*.egg-info
*.egg
# Version info
src/jppy/version.py
# Temporary folders and meta-data
tmp/
# Data folders
pdfs/
[build-system]
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"]
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4", "pybind11>=2.6"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
write_to = "jppy/version.py"
write_to = "src/jppy/version.py"
#!/usr/bin/env bash
export URL="http://pi1139.physik.uni-erlangen.de/data/latest"
export URL="http://sftp.km3net.de/data/latest/"
if [ ! -d "pdfs" ]; then
echo "Retrieving PDFs..."
mkdir pdfs
......
[metadata]
name = jppy
description = "Jpp Python package"
long_description = file: README.rst
long_description_content_type = text/x-rst
url = https://git.km3net.de/km3py/jppy
author = Tamas Gal
author_email = tgal@km3net.de
maintainer = Tamas Gal
maintainer_email = tgal@km3net.de
license = MIT
license_files = LICENSE
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
Intended Audience :: Science/Research
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: C++
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Topic :: Scientific/Engineering
keywords =
C++11
Python bindings
KM3NeT
muon
neutrino
shower
hadronic
electromagnetic
Photomultiplier tubes
probability density function
[options]
packages = find:
install_requires =
pybind11>=2.4
setuptools>=40.6.2
setuptools_scm
toml
python_requires = >=3.6
include_package_data = True
package_dir =
=src
[build_ext]
inplace=1
[options.packages.find]
where = src
[options.extras_require]
all =
ipykernel
dev =
ipykernel
pytest
pytest-cov
pytest-flake8
pytest-pylint
pytest-watch
sphinx-gallery>=0.1.12
sphinx-rtd-theme>=0.3
sphinx>=1.6.3
sphinxcontrib-napoleon>=0.6.1
sphinxcontrib-programoutput>=0.11
sphinxcontrib-websupport>=1.0.1
sphinx-autoapi
twine
wheel
[bdist_wheel]
universal = 1
[tool:pytest]
junit_family = xunit2
addopts = -vv -rs -Wd
testpaths =
tests
[check-manifest]
ignore =
src/version.py
#!/usr/bin/env python3
import os
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
......@@ -19,38 +20,13 @@ class get_pybind_include(object):
import pybind11
return pybind11.get_include(self.user)
def get_jpp_include():
jpp_dir = os.getenv("JPP_DIR")
if jpp_dir:
return os.path.join(jpp_dir, "software")
return "jpp"
return "src/jpp"
ext_modules = [
Extension(
'jppy.{}'.format(module),
['src/{}.cc'.format(module)],
include_dirs=[
get_pybind_include(),
get_pybind_include(user=True),
get_jpp_include()
],
language='c++') for module in ['pdf', 'npe']
]
# Populating the __init__.py with submodule imports, so that one can import
# the package and use the submodules directly with the dot-sytax.
with open("jppy/__init__.py", "w") as fobj:
fobj.write("""from pkg_resources import get_distribution, DistributionNotFound
try:
version = get_distribution(__name__).version
except DistributionNotFound:
version = "unknown version"
""")
for module in ext_modules:
fobj.write("from . import {}\n".format(module.name.split('.')[1]))
# As of Python 3.6, CCompiler has a `has_flag` method.
# cf http://bugs.python.org/issue26689
......@@ -117,18 +93,23 @@ class BuildExt(build_ext):
build_ext.build_extensions(self)
setup(
name='jppy',
author='Tamas Gal',
author_email='tgal@km3net.de',
url='https://git.km3net.de/km3py/jppy',
description='Jpp Python Package',
packages=["jppy"],
long_description="jppy - Jpp Python Package",
ext_modules=ext_modules,
install_requires=['pybind11>=2.4'],
setup_requires=['pybind11>=2.4', 'setuptools_scm'],
use_scm_version=True,
cmdclass={'build_ext': BuildExt},
zip_safe=False,
)
if __name__ == '__main__':
setup_args = dict(
ext_modules = [
Extension(
'jppy.{}'.format(module),
['src/jppy/{}.cc'.format(module)],
include_dirs=[
get_pybind_include(),
get_pybind_include(user=True),
get_jpp_include()
],
language='c++') for module in ['constants', 'geane', 'pdf', 'npe']
],
cmdclass = dict(
build_ext = BuildExt
)
)
setup(**setup_args)
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment