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 pyproject.toml, move static options to setup.cfg, style #317

Merged
merged 1 commit into from
Apr 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools >= 40.6.0", "wheel"]
build-backend = "setuptools.build_meta"
10 changes: 10 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[metadata]
name = lstchain
description = Analysis chain for the CTA-LST prototype
author = LST collaboration
author_email = rlopezcoto@gmail.com
license = MIT
url=https://github.com/cta-observatory/cta-lstchain
long_description = file: README.md
long_description_content_type = text/markdown
github_project = cta-observatory/cta-lstchain
54 changes: 33 additions & 21 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,53 @@
# import sys
from setuptools import setup, find_packages
import os
from version import get_version, update_release_version
import sys

# pep 517 builds do not have pwd in PATH
sys.path.insert(0, os.path.dirname(__file__))
from version import get_version, update_release_version # noqa


update_release_version()
version = get_version()


def find_scripts(script_dir, prefix):
script_list = [f'{os.path.splitext(f)[0]}' for f in os.listdir(script_dir) if f.startswith(prefix)]
script_list = [
os.path.splitext(f)[0]
for f in os.listdir(script_dir) if f.startswith(prefix)
]
script_dir = script_dir.replace('/', '.')
point_list = []

for f in script_list:
point_list.append(f"{f} = {script_dir}.{f}:main")
print(point_list)

return point_list

lstchain_list = find_scripts('lstchain/scripts','lstchain_')

lstchain_list = find_scripts('lstchain/scripts', 'lstchain_')
onsite_list = find_scripts('lstchain/scripts/onsite', 'onsite_')
tools_list = find_scripts('lstchain/tools', 'lstchain_')

entry_points = {}
entry_points['console_scripts'] = lstchain_list + onsite_list + tools_list

setup(name='lstchain',
version=version,
description="DESCRIPTION", # these should be minimum list of what is needed to run
packages=find_packages(),
install_requires=['h5py',
'seaborn'
],
package_data={'lstchain': ['data/lstchain_standard_config.json']},
tests_require=['pytest', 'pytest-ordering'],
author='LST collaboration',
author_email='',
license='',
url='https://github.com/cta-observatory/cta-lstchain',
long_description='',
classifiers=[],
entry_points=entry_points
)
setup(
maxnoe marked this conversation as resolved.
Show resolved Hide resolved
version=version,
packages=find_packages(),
py_modules='version',
install_requires=[
'ctapipe',
'h5py',
'seaborn'
],
package_data={
'lstchain': ['data/lstchain_standard_config.json']
},
tests_require=[
'pytest',
'pytest-ordering',
],
entry_points=entry_points
)