'python3 setup.py sdist' just creates the source, not a wheel. Anyway,
I made some progress by adding a section [tool.poetry.scripts] to
pyproject.toml and doing some other minor changes. Now an executable
is added to the Scripts directory which starts to run Mnemosyne.
However, where it currently fails is that the new poetry
infrastructure does not know that it should build the dependencies
(build, build-po in the makefile)...

Ace, any idea how best to do this?

Thanks!

Peter

On Wed, Oct 4, 2023 at 12:44 PM Ace Alba <[email protected]> wrote:
>
> When building the dists, we might need to use
>
> python3 setup.py sdist
>
> Instead of Python3 -m build... ?
>
> Then reupload the packages to testpypi.
> On Wednesday, October 4, 2023 at 6:18:45 PM UTC+8 Peter Bienstman wrote:
>>
>> Excellent detective work, thanks a lot!
>>
>> I've tried the second option in a virtual environment, and it seems to
>> install everything just fine, apart from the main script to start
>> Mnemosye... In setup.py the location of this script is mentioned, but
>> perhaps there's something in the new poetry infrastructure that needs
>> to change in order to accomodate this as well? (I've very little
>> experience with poetry)
>>
>> Cheers,
>>
>> Peter
>>
>> On Wed, Oct 4, 2023 at 11:52 AM Ace Alba <[email protected]> wrote:
>> >
>> > Edit: Here's the solution for option two, which is much simpler. Use this 
>> > command instead.
>> >
>> > pip install --index-url https://test.pypi.org/simple/ --extra-index-url 
>> > https://pypi.org/simple/ mnemosyne==2.10.1
>> >
>> > This command allows pip to use pypi as an alternative repo in resolving 
>> > the dependencies. works on my end.
>> > On Wednesday, October 4, 2023 at 5:45:14 PM UTC+8 Ace Alba wrote:
>> >>
>> >> Here's our blocker. It's no one's fault but the nature of how pip 
>> >> resolves dependencies. See
>> >>
>> >> https://stackoverflow.com/questions/49900875/pip-install-fails-to-install-dependencies
>> >>
>> >> With the following paragraph:
>> >>
>> >> When installing a package from testPyPI, the dependencies are also 
>> >> installed from there. And it seems, that while there are many packages 
>> >> available, pytables and progress are apparently missing. This caused the 
>> >> installation to fail.
>> >>
>> >> So though we followed the instructions to the letter, we cannot proceed 
>> >> because testpypi will always get the packages from testpypi repository 
>> >> (which does not have the dependencies), not from pypi (where the 
>> >> dependencies are actually located). So installing our test package from 
>> >> testpypi will always cause it to break.
>> >>
>> >> We have two options:
>> >> 1. A test deploy from pypi itself.
>> >>
>> >> because the commands listed rely on pyproject.toml, all you need is to:
>> >> - rename the package name in pyproject.toml (i.e. mnemosyne-test or 
>> >> another name)
>> >> - clear out everything from the dist/ folder
>> >> - go do the same process again in the article (register a pypi account, 
>> >> python3 -m build, etc.,) up until..
>> >> - when uploading the distributions, use `twine upload --verbose 
>> >> --repository pypi dist/*` instead of `testpypi`
>> >> - download the package using the pip install command
>> >> - if the package is successfully installed, i guess it is successful. so 
>> >> the test package can be deleted from pypi.
>> >> - then restore back the proper package name in pyproject.toml. purge all 
>> >> contest of dist/*, then do everything all over again.
>> >>
>> >> 2. figure out a way for pip to resolve the dependency tree from pypi 
>> >> instead of testpypi. I don't know how to do this.
>> >
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "mnemosyne-proj-users" group.
>> > To unsubscribe from this group and stop receiving emails from it, send an 
>> > email to [email protected].
>> > To view this discussion on the web visit 
>> > https://groups.google.com/d/msgid/mnemosyne-proj-users/a478ec86-5a17-4215-920e-d41208eaf735n%40googlegroups.com.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "mnemosyne-proj-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/mnemosyne-proj-users/bb174636-3457-420b-b9e2-f6dd8b47e8bdn%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mnemosyne-proj-users/CAMdxoPF0Apm0tDouR1epCNmBHQYLUj%3Di%3D6Fkfo7EmE1MLPzDmA%40mail.gmail.com.

Reply via email to