Skip to content
Snippets Groups Projects
Commit 13eddedc authored by Walsh, Michael's avatar Walsh, Michael
Browse files

Merge branch 'fix_package_builds' into 'next'

Create a copy of the code for creating the package in

See merge request sns-hfir-scse/sans/sans-backend!977

Former-commit-id: 1f00fa19
parents ee2a85e1 2d887a78
No related branches found
No related tags found
No related merge requests found
......@@ -111,6 +111,7 @@ docs-feature:
dependencies:
- dockerbuild
script:
- set -x
- sudo rm -rf /tmp/sans-backend || true
- sudo mkdir -p /tmp/sans-backend
- sudo cp -r . /tmp/sans-backend
......@@ -118,7 +119,7 @@ docs-feature:
- pushd /tmp/sans-backend
- docker login --username=$CI_REGISTRY_USER --password=$CI_REGISTRY_PASSWORD $CI_REGISTRY
- time docker pull $CONTAINER_URL
- time docker run -u 0:0 -v $PWD:/opt/sans-backend -t $CONTAINER_URL bash -c "source activate drtsans-dev; cd /opt/sans-backend/docs; make html"
- time docker run -u 0:0 -v $PWD:/opt/sans-backend -t $CONTAINER_URL bash -c "source activate drtsans-dev&& cp -R /opt/sans-backend /tmp/ && cd /tmp/sans-backend/docs&& make html"
- ls .
- popd
tags:
......@@ -234,6 +235,7 @@ create-wheel:
dependencies:
- dockerbuild
script:
- set -x
- sudo rm -rf /tmp/sans-backend || true
- sudo mkdir -p /tmp/sans-backend
- sudo cp -r . /tmp/sans-backend
......@@ -252,6 +254,11 @@ conda-package:
- create-wheel
- dockerbuild
script:
- sudo rm -rf /tmp/sans-backend || true
- sudo mkdir -p /tmp/sans-backend
- sudo cp -r . /tmp/sans-backend
- sudo chmod 777 /tmp/sans-backend
- pushd /tmp/sans-backend
- docker login --username=$CI_REGISTRY_USER --password=$CI_REGISTRY_PASSWORD $CI_REGISTRY
- time docker pull $CONTAINER_URL
- time docker run -v $PWD:/opt/sans-backend -t $CONTAINER_URL bash -c "bash /opt/sans-backend/scripts/publish_package.sh"
......
......@@ -15,16 +15,17 @@ source:
build:
noarch: python
number: {{ version_number }}
string: py{{py}}
script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed -vv
requirements:
host:
- python
- python=3.8
build:
- python=3.8
- setuptools
- versioneer
- mantid
run:
- jsonschema>=3.0.2
......@@ -35,8 +36,8 @@ requirements:
- sortedcontainers
- tinydb # not imported
- ipywidgets # not imported
- python {{ python }}
- mantidworkbench
- python=3.8
- mantid
test:
imports:
......
#!/bin/bash
set -x
source activate drtsans-dev
cd /opt/sans-backend
cp -R /opt/sans-backend /tmp/
cd /tmp/sans-backend
python -m build --wheel --no-isolation
check-wheel-contents dist/drtsans-*.whl
# Build conda library
set -e
set -ex
echo GITHUB REF $CI_COMMIT_REF_SLUG
# cd into the correct directory
THISFILE=$(readlink -f "$0")
DIREC=$(dirname $THISFILE) # directory of executable
cd "${DIREC}/../conda.recipe"
cp -R /opt/sans-backend /tmp/
cd /tmp/sans-backend/conda.recipe
# setup and build the conda package
conda update -y -n base conda
conda install -y anaconda-client conda-build conda-verify
conda build --output-folder . . -c neutrons -c mantid/label/nightly -c conda-forge
conda render .
conda build --output-folder . . -c mantid/label/nightly -c conda-forge -c defaults
# show what tarballs were created
ls */*.tar.bz2
......
......@@ -35,6 +35,12 @@ test_requires = read_requirements_from_file(
os.path.join(THIS_DIR, "requirements_dev.txt")
)
CLASSIFIERS = [
"Development Status :: 5 - Production/Stable",
"Natural Language :: English",
"Operating System :: Linux",
"Programming Language :: Python",
]
setup(
name="drtsans",
......@@ -45,6 +51,7 @@ setup(
long_description="""ORNL SANS reduction""",
license="Apache License 2.0",
zip_safe=False,
classifiers=CLASSIFIERS,
packages=find_packages(exclude=["tests", "tests.*"]),
scripts=scripts,
package_dir={},
......@@ -55,6 +62,4 @@ setup(
]
},
install_requires=install_requires,
setup_requires=["pytest-runner"],
tests_require=test_requires,
)
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