Skip to content

Commit 40750a5

Browse files
committed
pyproject.toml and mods to install correctly
1 parent 70620f7 commit 40750a5

File tree

6 files changed

+100
-142
lines changed

6 files changed

+100
-142
lines changed

dpx/srxplanargui/calibration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
from diffpy.srxplanar.selfcalibrate import selfCalibrate
3939
from diffpy.srxplanar.srxplanarconfig import checkMax
4040

41-
from dpx.confutils.tools import module_exists_lower
41+
from diffpy.srxconfutils.tools import module_exists_lower
4242
if module_exists_lower('pyfai'):
4343
import pyFAI
4444
missingpyFAI = False

dpx/srxplanargui/live.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
from dpx.srxplanargui.help import SrXguiHelp
4747
from dpx.srxplanargui.calibration import Calibration
4848

49-
from dpx.confutils.tools import checkFileVal
49+
from diffpy.srxconfutils.tools import checkFileVal
5050

5151
class SrXguiLive(SrXgui):
5252

dpx/srxplanargui/srxconfig.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
##############################################################################
1515

1616
import numpy as np
17-
import ConfigParser
17+
import configparser
1818
import re, os, sys
1919
from functools import partial
2020
import argparse
@@ -35,8 +35,8 @@
3535
from traitsui.menu import ToolBar, OKButton, CancelButton, Menu, MenuBar, OKCancelButtons
3636
from pyface.api import ImageResource
3737

38-
from dpx.confutils.configtraits import ConfigBaseTraits
39-
from dpx.confutils.tools import _configPropertyRad, _configPropertyR, _configPropertyRW
38+
from diffpy.srxconfutils.configtraits import ConfigBaseTraits
39+
from diffpy.srxconfutils.tools import _configPropertyRad, _configPropertyR, _configPropertyRW
4040
from diffpy.srxplanar.srxplanarconfig import _description, _epilog, _optdatalist, \
4141
_defaultdata, checkMax
4242

pyproject.toml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
[build-system]
2+
requires = ["setuptools>=62.0", "setuptools-git-versioning>=2.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "diffpy.srxplanargui"
7+
dynamic=['version', 'dependencies']
8+
authors = [
9+
{ name="Simon J.L. Billinge group", email="simon.billinge@gmail.com" },
10+
]
11+
maintainers = [
12+
{ name="Simon J.L. Billinge group", email="simon.billinge@gmail.com" },
13+
]
14+
description = "xPDFsuite, a software for PDF transformation and visualization"
15+
keywords = ['diffpy', 'pdf', 'data interpretation']
16+
readme = "README.rst"
17+
requires-python = ">=3.11, <3.14"
18+
classifiers = [
19+
'Development Status :: 5 - Production/Stable',
20+
'Environment :: Console',
21+
'Intended Audience :: Developers',
22+
'Intended Audience :: Science/Research',
23+
'License :: OSI Approved :: BSD License',
24+
'Operating System :: MacOS :: MacOS X',
25+
'Operating System :: Microsoft :: Windows',
26+
'Operating System :: POSIX',
27+
'Operating System :: Unix',
28+
'Programming Language :: Python :: 3.11',
29+
'Programming Language :: Python :: 3.12',
30+
'Programming Language :: Python :: 3.13',
31+
'Topic :: Scientific/Engineering :: Physics',
32+
'Topic :: Scientific/Engineering :: Chemistry',
33+
]
34+
35+
[project.scripts]
36+
srxgui = 'dpx.srxplanargui.srxguiapp:main'
37+
38+
[project.urls]
39+
Homepage = "https://github.com/diffpy/diffpy.srxplanargui/"
40+
Issues = "https://github.com/diffpy/diffpy.srxplanargui/issues/"
41+
42+
[tool.setuptools-git-versioning]
43+
enabled = true
44+
template = "{tag}"
45+
dev_template = "{tag}"
46+
dirty_template = "{tag}"
47+
48+
[tool.setuptools.packages.find]
49+
where = ["dpx"] # list of folders that contain the packages (["."] by default)
50+
include = ["*"] # package names should match these glob patterns (["*"] by default)
51+
exclude = [] # exclude packages matching these glob patterns (empty by default)
52+
namespaces = false # to disable scanning PEP 420 namespaces (true by default)
53+
54+
[tool.setuptools.dynamic]
55+
dependencies = {file = ["requirements/pip.txt"]}
56+
57+
[tool.codespell]
58+
exclude-file = ".codespell/ignore_lines.txt"
59+
ignore-words = ".codespell/ignore_words.txt"
60+
skip = "*.cif,*.dat,*agr"
61+
62+
[tool.docformatter]
63+
recursive = true
64+
wrap-summaries = 72
65+
wrap-descriptions = 72
66+
67+
[tool.black]
68+
line-length = 79
69+
include = '\.pyi?$'
70+
exclude = '''
71+
/(
72+
\.git
73+
| \.hg
74+
| \.mypy_cache
75+
| \.tox
76+
| \.venv
77+
| \.rst
78+
| \.txt
79+
| _build
80+
| buck-out
81+
| build
82+
| dist
83+
84+
# The following are specific to Black, you probably don't want those.
85+
| blib2to3
86+
| tests/data
87+
)/
88+
'''

requirements/pip.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
numpy
2+
traits
3+
traitsui
4+
chaco
5+
pyface
6+
diffpy.srxplanar
7+
configparser

setup.py

Lines changed: 0 additions & 137 deletions
This file was deleted.

0 commit comments

Comments
 (0)