Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Ubadub opened this issue May 25, 2023 · 4 comments
Open

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

Ubadub opened this issue May 25, 2023 · 4 comments

Comments

@Ubadub
Copy link

Ubadub commented May 25, 2023

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
Copy link
Author

Ubadub commented May 27, 2023

@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
Copy link
Author

Ubadub commented May 27, 2023

I have submitted a PR for this here: #64

@anoopkunchukuttan
Copy link
Owner

anoopkunchukuttan commented Jun 22, 2023

Sorry for the delay @Ubadub

  • You can add me as the recipe maintainer.
  • There is already a version.txt inside the indicnlp directory, and version info is passed in as parameter to the setup function.

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

@Ubadub
Copy link
Author

Ubadub commented Jun 22, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants