ppannuto / python-titlecase

Python library to capitalize strings as specified by the New York Times Manual of Style
MIT License
249 stars 38 forks source link

New release #52

Closed charettes closed 4 years ago

charettes commented 4 years ago

Given a few enhancements were made since 0.12.0 it'd be great if they could be released.

ppannuto commented 4 years ago

I need to fix #50 before I can make a release; day job has gotten in the way of digging into the nuances of python install stuff in the short term. If someone else knows how to easily fix it, I'm happy to pull

charettes commented 4 years ago

@ppannuto you'll need to either hardcode the __version__ it setup.py or parse the __init__.py module without loading it to extra the __version__. Would you like me to submit a PR that does that?

ppannuto commented 4 years ago

Is there a "right" or "standard" way of doing this in Python? I thought it was already set up the "right" way.... :/

1kastner commented 4 years ago

@ppannuto Well, it was the right way before an external dependency was added. Could maybe a try/except block help here? If the interface is the same, re can be imported as regex (turning it in a somehow softer dependency) since this is only for installation.

charettes commented 4 years ago

Simply building wheels of your package should also circumvent this problem.

ppannuto commented 4 years ago

I do usually build wheels I think? From my bash history, I usually run: python3 setup.py sdist bdist_wheel upload to push updates to pip

1kastner commented 4 years ago

Simply building wheels of your package should also circumvent this problem.

Well, it does not solve the initial installation problem I wrote. If we say that this is supposed to be broken because developers need to first install the dependencies, that'd be a solution, too. It would not be clean though.

charettes commented 4 years ago

@1kastner it would because wheels installs simply copy files as opposed to running setup.py in source packages which triggers the ImportError mentioned in #50. Only old versions of pip will prefer source packages over wheels and invoke setup.py like you did in your report.

ppannuto commented 4 years ago

Shouldn't you also be able to clone the repo and run setup.py though? i.e. the python3 setup.py develop case? I don't think wheels alone ever solve the problem.

1kastner commented 4 years ago

For example the pandas setup uses versioneer for this task. The module requests stores the version number including other metadata in a separate file. I guess there are plenty of other versions out there as well.

igorburago commented 4 years ago

Perhaps this issue may now be closed, given that #50 has been closed thanks to #55 being merged?

ppannuto commented 4 years ago

PyPI is officially in sync with current master (cf59b1f2): https://pypi.org/project/titlecase/

Thanks one last time to @iburago for figuring out the versioning and setup stuff.