pkgsrc/devel/py-isort/Makefile

33 lines
955 B
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.17 2019/07/01 07:15:00 adam Exp $
DISTNAME= isort-4.3.21
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
CATEGORIES= devel python
MASTER_SITES= ${MASTER_SITE_PYPI:=i/isort/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://github.com/timothycrosley/isort
COMMENT= Python utility / library to sort imports
LICENSE= mit
DEPENDS+= ${PYPKGPREFIX}-lama-[0-9]*:../../devel/py-lama
TEST_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test
.include "../../lang/python/pyversion.mk"
py-isort: updated to 4.3.6 4.3.6: - Fixes a fatal error that occurs if a single finder throws an exception. Important as we add more finders that utilize third party libraries. 4.3.5: This is the final Python 2.x release of isort, and includes the following major changes: Potentially Interface Breaking: - The -r option for removing imports has been renamed -rm to avoid accidental deletions and confusion with the -rc recursive option. - __init__.py has been removed from the default ignore list. The default ignore list is now empty - with all items needing to be explicitly ignored. - Isort will now by default ignore .tox / venv folders in an effort to be "safe". You can disable this behaviour by setting the "--unsafe" flag, this is separate from any skip or not skip rules you may have in place. - Isort now allows for files missing closing newlines in whitespace check - distutils support has been removed to simplify setup.py New: - Official Python 3.7 Compatibility. - Support for using requirements files to auto determine third-paty section if pipreqs & requirementslib are installed. - Added support for using pyproject.toml if toml is installed. - Added support for XDG_HOME if appdirs is installed. - An option has been added to enable ignoring trailing comments ('ignore_comments') defaulting to False. - Added support to enable line length sorting for only specific sections - Added a correctly_sorted property on the SortsImport to enable more intuitive programmatic checking. Fixes: - Improved black compatibility. - Isort will no detect files in the CWD as first-party. - Fixed several cases where '-ns' or 'not_skip' was being incorrectly ignored. - Fixed sorting of relative path imports ('.', '..', '...', etc). - Fixed bugs caused by a failure to maintain order when loading iterables from config files. - Correctly handle CPython compiled imports and others that need EXT_SUFFIX to correctly identify. - Fixed handling of Symbolic Links to follow them when walking the path. - Fixed handling of relative known_paths. - Fixed lack of access to all wrap modes from the CLI. - Fixed handling of FIFO files. - Fixed a bug that could result in multiple imports being inserted on the same line.
2019-02-25 10:00:35 +01:00
.if ${_PYTHON_VERSION} == 27
DEPENDS+= ${PYPKGPREFIX}-backports.functools_lru_cache-[0-9]*:../../devel/py-backports.functools_lru_cache
DEPENDS+= ${PYPKGPREFIX}-futures-[0-9]*:../../devel/py-futures
.endif
USE_LANGUAGES= # none
py-isort: updated to 4.3.6 4.3.6: - Fixes a fatal error that occurs if a single finder throws an exception. Important as we add more finders that utilize third party libraries. 4.3.5: This is the final Python 2.x release of isort, and includes the following major changes: Potentially Interface Breaking: - The -r option for removing imports has been renamed -rm to avoid accidental deletions and confusion with the -rc recursive option. - __init__.py has been removed from the default ignore list. The default ignore list is now empty - with all items needing to be explicitly ignored. - Isort will now by default ignore .tox / venv folders in an effort to be "safe". You can disable this behaviour by setting the "--unsafe" flag, this is separate from any skip or not skip rules you may have in place. - Isort now allows for files missing closing newlines in whitespace check - distutils support has been removed to simplify setup.py New: - Official Python 3.7 Compatibility. - Support for using requirements files to auto determine third-paty section if pipreqs & requirementslib are installed. - Added support for using pyproject.toml if toml is installed. - Added support for XDG_HOME if appdirs is installed. - An option has been added to enable ignoring trailing comments ('ignore_comments') defaulting to False. - Added support to enable line length sorting for only specific sections - Added a correctly_sorted property on the SortsImport to enable more intuitive programmatic checking. Fixes: - Improved black compatibility. - Isort will no detect files in the CWD as first-party. - Fixed several cases where '-ns' or 'not_skip' was being incorrectly ignored. - Fixed sorting of relative path imports ('.', '..', '...', etc). - Fixed bugs caused by a failure to maintain order when loading iterables from config files. - Correctly handle CPython compiled imports and others that need EXT_SUFFIX to correctly identify. - Fixed handling of Symbolic Links to follow them when walking the path. - Fixed handling of relative known_paths. - Fixed lack of access to all wrap modes from the CLI. - Fixed handling of FIFO files. - Fixed a bug that could result in multiple imports being inserted on the same line.
2019-02-25 10:00:35 +01:00
post-install:
cd ${DESTDIR}${PREFIX}/bin && \
${MV} isort isort-${PYVERSSUFFIX} || ${TRUE}
do-test:
cd ${WRKSRC} && pytest-${PYVERSSUFFIX} test_isort.py
.include "../../lang/python/egg.mk"
.include "../../mk/bsd.pkg.mk"