forked from tatianarijoff/TLWallNew
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·178 lines (154 loc) · 4.8 KB
/
Copy pathsetup.py
File metadata and controls
executable file
·178 lines (154 loc) · 4.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
"""
Setup script for pytlwall package.
pytlwall is a Python implementation for calculating resistive wall impedance
using transmission line theory, originally developed at CERN.
This setup includes both the core pytlwall library and the pytlwall_gui
graphical interface.
"""
from setuptools import setup, find_packages
from pathlib import Path
# Read the long description from README
readme_file = Path(__file__).parent / "README.md"
if readme_file.exists():
long_description = readme_file.read_text(encoding="utf-8")
else:
long_description = "Transmission line impedance calculation engine"
# Read version from _version.py
version_file = Path(__file__).parent / "pytlwall" / "_version.py"
version = "1.0.0" # Default
if version_file.exists():
with open(version_file) as f:
for line in f:
if line.startswith("__version__"):
version = line.split("=")[1].strip().strip('"').strip("'")
break
#########
# Setup #
#########
setup(
# Package metadata
name="pytlwall",
version=version,
description="Transmission line impedance calculation engine with GUI",
long_description=long_description,
long_description_content_type="text/markdown",
# Author information
author="Tatiana Rijoff, Carlo Zannini",
author_email="tatiana.rijoff@gmail.com",
maintainer="Tatiana Rijoff",
maintainer_email="tatiana.rijoff@gmail.com",
# URLs
url="https://github.com/CERN/pytlwall",
project_urls={
"Bug Reports": "https://github.com/CERN/pytlwall/issues",
"Source": "https://github.com/CERN/pytlwall",
"Documentation": "https://github.com/CERN/pytlwall/blob/main/README.md",
},
# License
license="MIT",
# Classifiers for PyPI
classifiers=[
# Development Status
"Development Status :: 5 - Production/Stable",
# Intended Audience
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
# Topic
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering",
# License
"License :: OSI Approved :: MIT License",
# Python versions
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
# Operating Systems
"Operating System :: OS Independent",
# Natural Language
"Natural Language :: English",
],
# Keywords for search
keywords="impedance, transmission line, accelerator physics, CERN, beam dynamics, GUI",
# Package discovery - include both pytlwall and pytlwall_gui
packages=find_packages(
exclude=["tests", "tests.*", "examples", "examples.*", "docs", "docs.*"]
),
# Python version requirement
python_requires=">=3.8",
# Core dependencies (without GUI)
install_requires=[
"numpy>=1.20.0",
"scipy>=1.7.0",
"matplotlib>=3.3.0",
"openpyxl>=3.0.0",
],
# Optional dependencies
extras_require={
# GUI requires PyQt5
"gui": [
"PyQt5>=5.15.0",
],
# Development tools
"dev": [
"pytest>=7.0",
"pytest-cov>=3.0",
"black>=22.0",
"flake8>=4.0",
"mypy>=0.950",
"ruff>=0.1.0",
],
# Documentation
"docs": [
"sphinx>=4.0",
"sphinx-rtd-theme>=1.0",
"myst-parser>=0.18",
],
# Testing
"test": [
"pytest>=7.0",
"pytest-cov>=3.0",
],
# All optional dependencies
"all": [
"PyQt5>=5.15.0",
"pytest>=7.0",
"pytest-cov>=3.0",
"black>=22.0",
"flake8>=4.0",
"mypy>=0.950",
"ruff>=0.1.0",
"sphinx>=4.0",
"sphinx-rtd-theme>=1.0",
],
},
# Package data - include Yokoya factors and GUI resources
include_package_data=True,
package_data={
"pytlwall": [
"yokoya_factors/*.txt",
"yokoya_factors/*.dat",
"yokoya_factors/*.csv",
],
"pytlwall_gui": [
"*.png",
"*.ico",
"*.svg",
"resources/*",
"logo.png",
],
},
# Entry points for command-line scripts
entry_points={
"console_scripts": [
"pytlwall=pytlwall.__main__:main",
],
"gui_scripts": [
"pytlwall-gui=pytlwall_gui.main:main",
],
},
# Zip safe
zip_safe=False,
)