kind: autotools

depends:
- filename: gnu-toolchain.bst
  type: build
- filename: core/openssl-new.bst
  type: build
- filename: core/bzip2.bst
  type: build
- filename: core/libexpat.bst
  type: build
- filename: core/libffi.bst
  type: build
- filename: core/sqlite3.bst
  type: build
- filename: core/ncurses.bst
  type: build
- filename: core/readline.bst
  type: build

sources:
- kind: git
  url: upstream:cpython
  track: v3.5.2
  ref: 609bc370055e03b3c74c4321a5990929c29a226d

config:
  configure-commands:
  - |
    ./configure --prefix="%{prefix}"  \
                --sysconfdir=/etc   \
                --enable-shared     \
                --with-system-expat \
                --with-system-ffi
  install-commands:
    (>):
    - test -x "%{install-root}"/"%{prefix}"/bin/python || ln -s python3.5 "%{install-root}"/"%{prefix}"/bin/python
    - test -x "%{install-root}"/"%{prefix}"/bin/python3 || ln -s python3.5 "%{install-root}"/"%{prefix}"/bin/python3
    - test -x "%{install-root}"/"%{prefix}"/bin/python-config || ln -s python3.5-config
      "%{install-root}"/"%{prefix}"/bin/python-config
    - test -x "%{install-root}"/"%{prefix}"/bin/python3-config || ln -s python3.5-config
      "%{install-root}"/"%{prefix}"/bin/python3-config
