anoopkunchukuttan / indic_nlp_library

Resources and tools for Indian language Natural Language Processing
http://anoopkunchukuttan.github.io/indic_nlp_library/
MIT License
543 stars 158 forks source link

Making indic-nlp-library available via Conda Forge #63

Open Ubadub opened 1 year ago

Ubadub commented 1 year ago

Hi,

Thank you for your incredibly helpful package. I am submitting it for inclusion on Conda Forge by creating a recipe as explained here. I believe that making the package accessible via Conda Forge (rather than just via Pip) will make it more accessible to those who would benefit from using it.

I am writing to make sure you (the owner of this repo - @anoopkunchukuttan) are ok with me listing you as a recipe maintainer. If you approve of this, please let me know. Otherwise, I will list just myself (note that recipe maintainer =/= package maintainer; the recipe maintainer is not in charge of the package itself, but rather only making sure it's listed on Conda Forge).

Thank you.

Ubadub commented 1 year ago

@anoopkunchukuttan I am unable to make this available in Conda Forge because your setup.py script is improperly configured: it does not include the version.txt file, even though this is required by the script itself. In order for the package to include this file, I believe you have to pass this argument to setuptools.setup in setup.py:

package_data={'indicnlp': ['version.txt']}

Otherwise, when you run setup.py from the PIP-downloaded package, it will fail to find version.txt and thus the setup script will abort.

Can you make this change? Or will you accept a PR if I submit one for this? Thank you.

Ubadub commented 1 year ago

I have submitted a PR for this here: https://github.com/anoopkunchukuttan/indic_nlp_library/pull/64/

anoopkunchukuttan commented 1 year ago

Sorry for the delay @Ubadub

Let me know if that works, or package_data needs to be set as you mention.

Ubadub commented 1 year ago

Thanks for your reply.

There is already a version.txt inside the indicnlp directory, and version info is passed in as parameter to the setup function.

The version.txt file is not bundled with the pip package, because pip only bundles .py files by default, and so when the source files are downloaded by Conda, it is not included. Thus, when conda executes the setup.py script, it results in an error, because the file is not there. In this PR, I have made the appropriate change so that the version.txt file does get bundled with the pip package.

Does that make sense? You can check this for yourself by running python setup.py sdist. You will notice that the resultant folder does not contain version.txt.

Let me know if you have any other questions.