-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
misc: add klayout #268
Merged
Merged
misc: add klayout #268
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -x | ||
|
||
# Identify OS | ||
UNAME_OUT="$(uname -s)" | ||
case "${UNAME_OUT}" in | ||
Linux*) OS=Linux;; | ||
*) OS="${UNAME_OUT}" | ||
echo "Unknown OS: ${OS}" | ||
exit;; | ||
esac | ||
|
||
cd ${SRC_DIR} | ||
./build.sh -build "${SRC_DIR}/build" -python "${PYTHON}" -expert -without-qtbinding -libpng -libexpat -dry-run | ||
|
||
cd ${SRC_DIR}/build | ||
make V=1 -j$CPU_COUNT | ||
make V=1 install | ||
|
||
cd ${SRC_DIR}/bin-release | ||
cp -a klayout strm* ${PREFIX}/bin/ | ||
cp -a *.so* ${PREFIX}/lib/ | ||
mkdir -p ${PREFIX}/lib/klayout/ | ||
cp -ar pymod *_plugins ${PREFIX}/lib/klayout/ |
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,53 @@ | ||
diff --git a/build.sh b/build.sh | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Log a github issue to get this upstream There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suspect @klayoutmatthias link statically intentionally. |
||
index e49c132e5..a035474bc 100755 | ||
--- a/build.sh | ||
+++ b/build.sh | ||
@@ -412,35 +412,8 @@ if [ "$PYTHON" != "" ] && [ "$PYTHON" != "-" ]; then | ||
|
||
# Get Python installation files | ||
if [ "$PYTHONLIBFILE" = "" ]; then | ||
- PYTHONLIBFILENAME=`$PYTHON -c "import sysconfig; print(sysconfig.get_config_vars('LDLIBRARY')[0])" 2>/dev/null` | ||
- if [ "$PYTHONLIBFILENAME" = "" ]; then | ||
- PYTHONLIBFILENAME=`$PYTHON -c "import sysconfig; print(sysconfig.get_config_vars('LIBRARY')[0])" 2>/dev/null` | ||
- fi | ||
- if [ "$PYTHONLIBFILENAME" = "" ]; then | ||
- PYTHONLIBFILENAME=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars('LDLIBRARY')[0])" 2>/dev/null` | ||
- fi | ||
- if [ "$PYTHONLIBFILENAME" = "" ]; then | ||
- PYTHONLIBFILENAME=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars('LIBRARY')[0])" 2>/dev/null` | ||
- fi | ||
- if [ "$PYTHONLIBFILENAME" = "" ]; then | ||
- echo "*** WARNING: Could not get Python library name" | ||
- else | ||
- PYTHONLIBFILEPATH=`$PYTHON -c "import sysconfig; print(sysconfig.get_config_vars('LIBDIR')[0])" 2>/dev/null` | ||
- if [ "$PYTHONLIBFILEPATH" = "" ]; then | ||
- PYTHONLIBFILEPATH=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars('LIBDIR')[0])" 2>/dev/null` | ||
- fi | ||
- if [ "$PYTHONLIBFILEPATH" = "" ]; then | ||
- echo "*** WARNING: Could not get Python library path" | ||
- else | ||
- PYTHONLIBFILE="$PYTHONLIBFILEPATH/$PYTHONLIBFILENAME" | ||
- if [ ! -f "$PYTHONLIBFILE" ]; then | ||
- echo " INFO: Python library not in default path, trying to use MULTIARCH" | ||
- PYTHONMULTIARCH=`$PYTHON -c "import sysconfig; print(sysconfig.get_config_vars('MULTIARCH')[0])" 2>/dev/null` | ||
- PYTHONLIBFILE="$PYTHONLIBFILEPATH/$PYTHONMULTIARCH/$PYTHONLIBFILENAME" | ||
- fi | ||
- echo " Python library found: $PYTHONLIBFILE" | ||
- fi | ||
- fi | ||
+ PYTHONLIBFILE=-lpython`$PYTHON -c "import sysconfig; print(sysconfig.get_config_vars('LDVERSION')[0])" 2>/dev/null` | ||
+ echo " Python library found: $PYTHONLIBFILE" | ||
fi | ||
|
||
if [ "$PYTHONINCLUDE" = "" ]; then | ||
@@ -537,8 +510,8 @@ if [ "$PYTHONINCLUDE" != "" ]; then | ||
echo "*** ERROR: wrong -pyinc path: $PYTHONINCLUDE/Python does not exist or is not a file" | ||
exit 1 | ||
fi | ||
- if [ ! -f "$PYTHONLIBFILE" ]; then | ||
- echo "*** ERROR: wrong -pylib path: $PYTHONLIBFILE does not exist or not a file" | ||
+ if [[ ! ${PYTHONLIBFILE} == -lpython3* ]]; then | ||
+ echo "*** ERROR: wrong -pylib path: $PYTHONLIBFILE does not look like a python library name" | ||
exit 1 | ||
fi | ||
else |
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,77 @@ | ||
# Use `conda-build-prepare` before building for a better version string. | ||
{% set version = '%s_%04i_%s'|format(GIT_DESCRIBE_TAG, GIT_DESCRIBE_NUMBER|int, GIT_DESCRIBE_HASH or 'gUNKNOWN') %} | ||
|
||
{% set python_version = PYTHON_VERSION | default('3.7') %} | ||
{% set py_suffix = 'py%s'|format(python_version|replace('.', '')) %} | ||
|
||
package: | ||
name: klayout | ||
version: {{ version }} | ||
|
||
source: | ||
git_url: https://github.com/KLayout/klayout.git | ||
git_rev: master | ||
patches: | ||
- force-python-dynamic-link.patch | ||
|
||
build: | ||
# number: 201803050325 | ||
number: {{ environ.get('DATE_NUM') }} | ||
# string: 20180305_0325_py37 | ||
string: {{ environ.get('DATE_STR') }}_{{ py_suffix }} | ||
script_env: | ||
- CI | ||
- CONDA_OUT | ||
- TEST_PACKAGE | ||
|
||
requirements: | ||
build: | ||
- make | ||
- {{ compiler('cxx') }} | ||
- {{ cdt('mesa-libgl-devel') }} # [linux] | ||
- {{ cdt('mesa-dri-drivers') }} # [linux] | ||
- {{ cdt('libselinux') }} # [linux] | ||
- {{ cdt('libxdamage') }} # [linux] | ||
- {{ cdt('libxxf86vm') }} # [linux] | ||
- {{ cdt('libxext') }} # [linux] | ||
- {{ cdt('libxfixes') }} # [linux] | ||
- {{ cdt('libxau') }} # [linux] | ||
- {{ cdt('libxcb') }} # [linux] | ||
- {{ cdt('expat') }} # [linux] | ||
- {{ cdt('libpng') }} # [linux] | ||
host: | ||
- python {{ python_version }} | ||
- ruby | ||
- qt | ||
- zlib | ||
run: | ||
- python {{ python_version }} | ||
- ruby | ||
- qt | ||
- zlib | ||
|
||
test: | ||
commands: | ||
- klayout -v | ||
|
||
about: | ||
home: https://www.klayout.de/ | ||
summary: 'Your Mask Layout Friend' | ||
description: | | ||
- View: Fast and accurate viewing of huge layout files | ||
- Edit: Draw, modify and transform hierarchical layout | ||
- Generate: Script layout generators, PCells and layout transformation tools | ||
- Analyze: Search, verify, and measure layout and code analysis scripts | ||
license: GPL-2.0-or-later | ||
license_family: GPL | ||
license_file: LICENSE | ||
doc_url: https://www.klayout.de/doc.html | ||
dev_url: https://github.com/KLayout/klayout | ||
|
||
extra: | ||
recipe-maintainers: | ||
- curtisma | ||
- klayoutmatthias | ||
- proppy | ||
- flaport | ||
- joamatab |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exit 1
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filed #269 since this seems more widespread.