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

Better langNames default #107

Open
sushain97 opened this issue Apr 5, 2018 · 10 comments
Open

Better langNames default #107

sushain97 opened this issue Apr 5, 2018 · 10 comments

Comments

@sushain97
Copy link
Member

Right now, we get a default of langNames.db. However, a pip install or Debian install as well now will put it inside /usr/local/share/apertium-apy. We should use pkg_resources to guess the correct path (and continue supporting running directly from source). Until then, users will just have to feed it the correct path.

cc @TinoDidriksen

@TinoDidriksen
Copy link
Member

From .deb and .rpm, that would be /usr/share/apertium-apy without local/

@sushain97
Copy link
Member Author

Hopefully pkg_resources is smart enough to give me the right path. It claims to be.

@ayushjainrksh
Copy link
Contributor

whatsapp image 2019-03-04 at 9 48 18 pm
What I need to do is write a script that runs this code and put langNames in the correct path? Would that solve the issue or I need to do something else?

@sushain97
Copy link
Member Author

This issue is about simply choosing a better default here: https://github.com/apertium/apertium-apy/blob/master/apertium_apy/apy.py#L185. (only if the pkg_resources library is available).

@ayushjainrksh
Copy link
Contributor

So when a user does pip install on linux, it should automatically feed path to langNames.db?

@sushain97
Copy link
Member Author

Ideally, yes. I think there's a function in pkg_resources that purports to take an installed file and give you the system's actual path.

@ayushjainrksh
Copy link
Contributor

So what I need to do is set 'default' to some other path instead of langNames.db

@ayushjainrksh
Copy link
Contributor

What is the function of parse_argument()? How does it work

@sushain97
Copy link
Member Author

The Python docs cover that.

@ayushjainrksh
Copy link
Contributor

Okay I will go through them

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

No branches or pull requests

3 participants