svn commit: r513737 - head/textproc/py-python-slugify

Matthew Seaman matthew at FreeBSD.org
Fri Oct 4 09:48:38 UTC 2019


On 04/10/2019 03:33, Kubilay Kocak wrote:
> On 4/10/2019 7:52 am, Matthew Seaman wrote:
>> -RUN_DEPENDS=    
>> ${PYTHON_PKGNAMEPREFIX}unidecode>=0.04.16:converters/py-unidecode@${PY_FLAVOR} 
>>
>> +RUN_DEPENDS=    
>> ${PYTHON_PKGNAMEPREFIX}text-unidecode>=1.3:converters/py-text-unidecode@${PY_FLAVOR} 
>>
>> +
>> +### Can alternatively require:
>> +###     
>> ${PYTHON_PKGNAMEPREFIX}unidecode>=1.1.1:converters/py-unidecode@${PY_FLAVOR} 
>>
>> +### but text-unidecode is preferred upstream.
> 
> Good method for this is an OPTIONS_SINGLE with both options, with the 
> OPTIONS_DEFAULT being the 'preferred' version

Yeah.  I thought about doing that, and concluded that it was needless 
complexity.

If you install this module using pip, it will always pull in 
text-unidecode as a dependency.  The way the code is written it will 
opportunistically use unidecode only if that is installed and 
text-unidecode isn't -- but it's not like unidecode and text-unidecode 
conflict with each other, so pip or any reasonable packaging system are 
just going to install the preferred text-unidecode module.

Basically, the support for using unidecode in the package seems pretty 
pointless.  I added the comment just for my own reference, having wasted 
half an hour working all the above out, and then recalling I went 
through the same exercise several months ago and came to exactly the 
same conclusion.

	Cheers,

	Matthew


More information about the svn-ports-head mailing list