-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
76 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- a/setup.py | ||
+++ b/setup.py | ||
@@ -12,14 +12,14 @@ | ||
__author__ = 'Paweł Zadrożny' | ||
__copyright__ = 'Copyright (c) 2018, Pawelzny' | ||
|
||
-with open('README.rst', 'r') as readme_file: | ||
+with open('README.rst', 'r', encoding='utf-8') as readme_file: | ||
readme = readme_file.read() | ||
|
||
|
||
def get_version(*file_paths): | ||
"""Retrieves the version from project/__init__.py""" | ||
filename = os.path.join(os.path.dirname(__file__), *file_paths) | ||
- version_file = open(filename).read() | ||
+ version_file = open(filename, encoding='utf-8').read() | ||
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", | ||
version_file, re.M) | ||
if version_match: |
11 changes: 11 additions & 0 deletions
11
mingw-w64-python-dotty-dict/0002-setuptools-scm-dependency.patch
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,11 @@ | ||
--- a/setup.py | ||
+++ b/setup.py | ||
@@ -56,7 +56,7 @@ | ||
package_dir={'dotty_dict': 'dotty_dict'}, | ||
include_package_data=True, | ||
use_scm_version=True, | ||
- install_requires=['setuptools_scm'], | ||
+ setup_requires=['setuptools_scm'], | ||
zip_safe=False, | ||
keywords='dot notation dict wrapper helper utils lib', | ||
classifiers=[ |
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,46 @@ | ||
# Maintainer: fauxpark <[email protected]> | ||
|
||
_realname=dotty_dict | ||
pkgbase=mingw-w64-python-${_realname/_/-} | ||
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname/_/-}") | ||
pkgver=1.3.0 | ||
pkgrel=1 | ||
pkgdesc="Dictionary wrapper for quick access to deeply nested keys (mingw-w64)" | ||
arch=('any') | ||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') | ||
url='https://github.com/pawelzny/dotty_dict' | ||
license=('MIT') | ||
depends=("${MINGW_PACKAGE_PREFIX}-python") | ||
makedepends=("${MINGW_PACKAGE_PREFIX}-python" | ||
"${MINGW_PACKAGE_PREFIX}-python-setuptools" | ||
"${MINGW_PACKAGE_PREFIX}-python-setuptools-scm") | ||
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz" | ||
"0001-readme-utf8.patch" | ||
"0002-setuptools-scm-dependency.patch") | ||
sha256sums=('eb0035a3629ecd84397a68f1f42f1e94abd1c34577a19cd3eacad331ee7cbaf0' | ||
'072e21c8e963ac7d446d36e8946a94b0be333e0a3d597b19e6f2ab068bc56ba6' | ||
'7deb7ff6d1ab9519667af7423daa7f83a8fc3efb4f7591b0d0369b2f5e964fe1') | ||
|
||
prepare() { | ||
cd "${srcdir}/${_realname}-${pkgver}" | ||
|
||
patch -Np1 -i "${srcdir}/0001-readme-utf8.patch" | ||
patch -Np1 -i "${srcdir}/0002-setuptools-scm-dependency.patch" | ||
} | ||
|
||
build() { | ||
cd "${srcdir}" | ||
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}" | ||
|
||
"${MINGW_PREFIX}"/bin/python setup.py build | ||
} | ||
|
||
package() { | ||
cd "${srcdir}/python-build-${MSYSTEM}" | ||
|
||
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ | ||
"${MINGW_PREFIX}"/bin/python setup.py install --prefix="${MINGW_PREFIX}" \ | ||
--root="${pkgdir}" --optimize=1 --skip-build | ||
|
||
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname/_/-}/LICENSE" | ||
} |