-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from fusion-energy/develop
improved setup and conda install
- Loading branch information
Showing
15 changed files
with
154 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,3 +130,6 @@ dmypy.json | |
|
||
# dagmc files | ||
*.h5m | ||
|
||
# version file | ||
_version.py |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
python3 -m pip install --upgrade build | ||
python3 -m build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{% set name = "stl_to_h5m" %} | ||
{% set version = "0.0.3" %} | ||
|
||
package: | ||
name: "{{ name|lower }}" | ||
version: {{ version }} | ||
|
||
source: | ||
path: .. | ||
|
||
build: | ||
number: 0 | ||
script: python setup.py install --single-version-externally-managed --record=record.txt | ||
|
||
requirements: | ||
build: | ||
- python {{ python }} | ||
- setuptools | ||
run: | ||
- python | ||
- moab | ||
- numpy | ||
|
||
test: | ||
imports: | ||
- stl_to_h5m | ||
requires: | ||
- pytest | ||
# source_files: | ||
# - tests/ | ||
# - examples/ | ||
# commands: | ||
# - pytest tests | ||
|
||
|
||
about: | ||
home: "https://github.com/fusion-energy/stl_to_h5m" | ||
license: MIT | ||
license_family: MIT | ||
license_file: LICENSE.txt | ||
doc_url: https://github.com/fusion-energy/stl_to_h5m | ||
dev_url: https://github.com/fusion-energy/stl_to_h5m | ||
summary: stl_to_h5m - Converts STL files to a DAGMC h5m file using PyMoab | ||
|
||
extra: | ||
recipe-maintainers: | ||
- shimwell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
#assumes anaconda-client and conda-build have been installed | ||
# conda install -y anaconda-client | ||
# conda install -y conda-build | ||
# anaconda login | ||
|
||
#cleans up files that get uploaded to the anaconda repo if not deleted | ||
find . -name \*.stl -type f -delete | ||
|
||
|
||
rm -rf /tmp/conda-build | ||
mkdir -p /tmp/conda-build | ||
rm -rf /tmp/conda-build | ||
|
||
conda-build conda/ -c conda-forge --croot /tmp/conda-build | ||
|
||
# converting using all includes quite a few oxs and linux versions. | ||
# conda convert /tmp/conda-build/linux-64/*.tar.bz2 --platform all -o /tmp/conda-build | ||
|
||
# option for converting package to specified platforms | ||
# currently there is no moab conda install on win-64 | ||
platforms=( osx-64 linux-64 ) | ||
find /tmp/conda-build/linux-64/ -name *.tar.bz2 | while read file | ||
do | ||
echo $file | ||
for platform in "${platforms[@]}" | ||
do | ||
conda convert --platform $platform $file -o /tmp/conda-build/ | ||
done | ||
done | ||
|
||
anaconda upload -f /tmp/conda-build/*/*.tar.bz2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
python: | ||
- 3.10 | ||
- 3.9 | ||
- 3.8 | ||
- 3.7 | ||
moab: | ||
- 5.3.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools >= 45", | ||
"wheel", | ||
"setuptools_scm[toml] >= 6.2", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools_scm] | ||
write_to = "stl_to_h5m/_version.py" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
[metadata] | ||
name = stl_to_h5m | ||
author = The stl_to_h5m Development Team | ||
author_email = mail@jshimwell.com | ||
description = Converts STL files to a DAGMC h5m file using PyMoab | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
url = https://github.com/fusion-energy/stl_to_h5m | ||
license = MIT | ||
license_file = LICENSE.txt | ||
classifiers = | ||
Natural Language :: English | ||
Topic :: Scientific/Engineering | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3.6 | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3.9 | ||
License :: OSI Approved :: MIT License | ||
Operating System :: OS Independent | ||
project_urls = | ||
Source = https://github.com/fusion-energy/stl_to_h5m | ||
Tracker = https://github.com/fusion-energy/stl_to_h5m/issues | ||
|
||
[options] | ||
packages = find: | ||
python_requires= >=3.6 | ||
install_requires= | ||
numpy >= 1.21.1 | ||
# moab is required as well but installed via conda | ||
|
||
[options.extras_require] | ||
tests = | ||
pytest >= 5.4.3 | ||
dagmc_h5m_file_inspector | ||
|
||
[flake8] | ||
per-file-ignores = __init__.py:F401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,4 @@ | ||
import setuptools | ||
|
||
with open("README.md", "r") as fh: | ||
long_description = fh.read() | ||
|
||
setuptools.setup( | ||
name="stl_to_h5m", | ||
version="develop", | ||
author="The stl_to_h5m Development Team", | ||
author_email="mail@jshimwell.com", | ||
description="Converts STL files to a DAGMC h5m file using PyMoab", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/fusion-energy/stl_to_h5m", | ||
packages=setuptools.find_packages(), | ||
package_data={ | ||
"stl_to_h5m": [ | ||
"requirements.txt", | ||
"README.md", | ||
"LICENSE", | ||
"tests/*.stl", | ||
] | ||
}, | ||
classifiers=[ | ||
'Natural Language :: English', | ||
'Topic :: Scientific/Engineering', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'License :: OSI Approved :: MIT License', | ||
'Operating System :: OS Independent', | ||
], | ||
python_requires='>=3.6', | ||
install_requires=[ | ||
"numpy", | ||
# 'pymoab' currently only available via conda-forge | ||
], | ||
) | ||
if __name__ == "__main__": | ||
setuptools.setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters