Skip to content

Commit

Permalink
Change from eggs to wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-m888 committed Dec 21, 2016
1 parent 91a279e commit 1bd29ab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -6,6 +6,9 @@ MANIFEST
build/
dist/

# Setuptools
gramps.egg-info/

# Gramps
data/tips.xml
data/holidays.xml
Expand Down
7 changes: 6 additions & 1 deletion setup.py
Expand Up @@ -32,8 +32,13 @@
if sys.version_info < (3, 2):
raise SystemExit("Gramps requires Python 3.2 or later.")

try:
from setuptools.core import setup
except ImportError:
from distutils.core import setup

from distutils import log
from distutils.core import setup, Command
from distutils.core import Command
from distutils.util import convert_path, newer
from distutils.command.build import build as _build
from distutils.command.install import install as _install
Expand Down

10 comments on commit 1bd29ab

@PQYPLZXHGF
Copy link

@PQYPLZXHGF PQYPLZXHGF commented on 1bd29ab Dec 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like this one, wheels are the way to go πŸ‘

Found your test on pypi:
pip install -i https://testpypi.python.org/pypi gramps

Need to install:

pip install bsddb3-6.2.1-cp34-cp34m-win_amd64.whl
pip install PyICU-1.9.5-cp34-cp34m-win_amd64.whl

But when I run:
python -c "from gramps.grampsapp import main; main()"

ResourcePath.ERROR: Unable to determine resource path

Not sure what Gramps is asking for? Any pointers?

Also get the same from python:

>>> import gramps
>>> dir(gramps)
['__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '
__name__', '__package__', '__path__', '__spec__']
>>> import gramps.grampsapp as app
ResourcePath.ERROR: Unable to determine resource path

For dir(gramps) I was expecting to see cli, gen, gui at least?

@sam-m888
Copy link
Owner Author

@sam-m888 sam-m888 commented on 1bd29ab Dec 30, 2016 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PQYPLZXHGF
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any ideas?

Not so far :(

@Nick-Hall
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The resource path specifies where Gramps can find its resource files. It is written to the gramps/gen/utils/resource-path file during installation. This file is not present if Gramps is run from a git tree in development.

It can also be specified using the GRAMPS_RESOURCES environment variable. This is used in Mac bundles.

@daleathan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Nick-Hall I don't believe you actually tried installing this as per @enlite93 's comment from the wheel which is like the python-egg?

I just tried it in an empty Linux VM and pip installed and I get the error mentioned, (so Gramps is not being run from a git tree development by me but from the pip wheel install), my guess is that @sam-m888 is right the Gramps needs to be told where its resources live without having to use the GRAMPS_RESOURCES environment variable HTH?

@Nick-Hall
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daleathan Sorry, I don't have time to investigate this myself.

Did the installation create the gramps/gen/utils/resource-path file? What are its contents?

@PQYPLZXHGF
Copy link

@PQYPLZXHGF PQYPLZXHGF commented on 1bd29ab Feb 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did the installation create the gramps/gen/utils/resource-path file? What are its contents?

With Linux Debian 8 no gramps/gen/utils/resource-path file was created

And with Win 10 the gramps/gen/utils/resource-path file was created but is a zero byte file. Also if you type gramps at the command line it is not recognised as no shortcut is installed like on Linux, but you can start python and import gramps

@Nick-Hall Wasn't aware of this configuration file; could only find it mentioned by youself.

@sam-m888 Hope this helps you?

@Nick-Hall
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no resource-path file in the wheel that Sam uploaded. The path is only known at installation, not when the wheel is created. Running a post-install script is not possible with wheels, so it looks like we need another approach. I suggest that we look for the resources in the standard places at run-time.

@sam-m888
Copy link
Owner Author

@sam-m888 sam-m888 commented on 1bd29ab Sep 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Nick-Hall
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should discuss this on the list again. disutils2 is now dead. setuptools/pip/wheels appears to be the way forward.

Please sign in to comment.