Skip to content

Commit 79e0cba

Browse files
Merge remote-tracking branch 'origin/master' into documentation_update
2 parents a873d0e + 3b3c47b commit 79e0cba

File tree

7 files changed

+32
-16
lines changed

7 files changed

+32
-16
lines changed

.github/workflows/code.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ jobs:
4242
# Put coverage in the output dir mounted in docker
4343
cov_file: /output/coverage.xml
4444
test_requires: cothread pytest-asyncio aioca
45+
# Build an sdist here so it has the right line endings
46+
sdist: true
4547

4648
- os: windows-latest
4749
cov_file: '{project}/dist/coverage.xml'
@@ -78,6 +80,7 @@ jobs:
7880
run: pip install build cibuildwheel
7981

8082
- name: Build Sdist
83+
if: matrix.sdist
8184
run: python -m build --sdist .
8285

8386
- name: Build Wheel
@@ -89,6 +92,7 @@ jobs:
8992
# Disable auditwheel as it isn't compatible with setuptools_dso approach
9093
# https://github.com/mdavidsaver/setuptools_dso/issues/17
9194
CIBW_REPAIR_WHEEL_COMMAND: ''
95+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
9296

9397
- name: Upload Wheel and Sdist
9498
uses: actions/upload-artifact@v2

Pipfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,9 @@ pytest-asyncio = "*"
1212

1313
[packages]
1414
# All other package requirements from setup.py
15-
softioc = {editable = true, path = "."}
15+
softioc = {editable = true, extras = ["useful"], path = "."}
1616
# Apart from the epicscorelibs which comes from pyproject.toml so needs to be here too
17-
epicscorelibs = "*"
18-
# Add some other useful extras
19-
cothread = "*"
20-
scipy = "*"
21-
aioca = ">=1.1"
17+
# epicscorelibs = "*"
2218

2319
[scripts]
2420
# Put coverage here so we don't interfere with debugging in the IDE

Pipfile.lock

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

setup.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ softioc =
3131
devIocStats.dbd
3232
iocStatsDb/*
3333

34+
[options.extras_require]
35+
# Useful extras for use at DLS
36+
useful =
37+
cothread
38+
scipy
39+
aioca >=1.1
40+
3441
[flake8]
3542
max-line-length = 80
3643
extend-ignore =

setup.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import epicscorelibs.version
77
from setuptools_dso import Extension, setup
88
from epicscorelibs.config import get_config_var
9+
from wheel.bdist_wheel import bdist_wheel
910

1011
# Place the directory containing _version_git on the path
1112
for path, _, filenames in os.walk(os.path.dirname(os.path.abspath(__file__))):
@@ -89,8 +90,19 @@ def install_for_development(self):
8990
if not os.path.exists(link):
9091
os.symlink(os.path.join(self.install_dir, "epicscorelibs"), link)
9192

93+
94+
class Wheel(bdist_wheel):
95+
def get_tag(self):
96+
impl, abi_tag, plat_name = bdist_wheel.get_tag(self)
97+
# We want to produce manylinux tagged builds, but can't use
98+
# auditwheel as it isn't compatible with setuptools_dso
99+
# override the tag here as cibuildwheel won't let us do this
100+
plat_name = os.environ.get("AUDITWHEEL_PLAT", plat_name)
101+
return (impl, abi_tag, plat_name)
102+
103+
92104
setup(
93-
cmdclass=dict(develop=Develop, **get_cmdclass()),
105+
cmdclass=dict(develop=Develop, bdist_wheel=Wheel, **get_cmdclass()),
94106
version=__version__,
95107
ext_modules = [ext],
96108
install_requires = [

tests/test_asyncio.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ async def test_asyncio_ioc(asyncio_ioc):
4141
atexit.unregister(_catools._catools_atexit)
4242

4343
# Start
44-
assert await caget(PV_PREFIX + ":UPTIME") in [
45-
"00:00:00", "00:00:01", "00:00:02", "00:00:03"
46-
]
44+
assert (await caget(PV_PREFIX + ":UPTIME")).startswith("00:00:0")
4745
# WAVEFORM
4846
await caput(PV_PREFIX + ":SINN", 4, wait=True)
4947
q = asyncio.Queue()

tests/test_cothread.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_cothread_ioc(cothread_ioc):
3636
from cothread.catools import ca_nothing, caget, caput, camonitor
3737

3838
# Start
39-
assert caget(PV_PREFIX + ":UPTIME") in ["00:00:00", "00:00:01"]
39+
assert caget(PV_PREFIX + ":UPTIME").startswith("00:00:0")
4040
# WAVEFORM
4141
caput(PV_PREFIX + ":SINN", 4, wait=True)
4242
q = cothread.EventQueue()

0 commit comments

Comments
 (0)