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

Publish as a Python package on PyPI #321

Open
noirbizarre opened this issue Dec 3, 2022 · 6 comments
Open

Publish as a Python package on PyPI #321

noirbizarre opened this issue Dec 3, 2022 · 6 comments
Labels
Milestone

Comments

@noirbizarre
Copy link
Contributor

It would be great if not awesome to publish this theme as a standalone package (It has multiple benefit for the end user).

Is ist something that could happen ?

If you prefer, I am totally volontary to submit a pull-request providing packaging, tooling, automation...
Would it be accepted If I propose ?

@alexandrevicenzi
Copy link
Owner

AFAIK only plugins are installed with pip, themes use the pelican theme tool and live in getpelican/pelican-themes repository on GitHub.

I can't find any official documentation that supports this theory. Do you have any?

I don't see a problem with PyPI, as long as Pelican migrates to that.

@noirbizarre
Copy link
Contributor Author

Pelican is progressively migrating to a everything is package approachas said here: getpelican/pelican#1564 (the important part is the end of the discussion).
It is announced on the plugin site but not on the theme site.
There is already an official Python Classifier: https://pypi.org/search/?c=Framework+%3A%3A+Pelican+%3A%3A+Themes

So while it is not mandatory and the transition will takes time, it is perfectly working (every theme from the PyPI query above is working just fine installed from PyPI).
So I would understand if you chose not to migrate, but if you accept I´l be glad to help packaging this repository properly

@alexandrevicenzi alexandrevicenzi added this to the 3.0-dev milestone Dec 7, 2022
@alexandrevicenzi
Copy link
Owner

Ok, sounds reasonable.

I have some changes coming up for 3.0, this feature would make sense as there are already a few themes in PyPI.

@noirbizarre
Copy link
Contributor Author

That's great news !!

Can I help ?

Do you have a packaging preference ? I tend to use pdm for all my projects now and I think it would be great on this project.
I can submit the change, including a few related cleanups:

  • gather all scripts (transifex, translations, pygments...) in pyproject.toml to list them with pdm run -l and execute them with pdm [run] my-script
  • dry tox.ini reusing pyproject.toml configuration
  • updated github workflows to reflect changes

@alexandrevicenzi
Copy link
Owner

I do have preferences, and it is the standard tools, aka setuptools and pip. I'm used to venv also. To publish on PyPI I use twine. I use pytest and/or tox to run tests because they are well-known.

v3 branch is not published yet, all changes are on my local copy, but soon it will be up in this repo and changes could be done there.

I don't really have an interest in tools that are not the standard ones. I also prefer yaml/json over toml. In case pdm can live well with standard tools I would not mind having it, but I would also not maintain it, since I don't use it.

pdm seems to be for python 3.7 and above, older versions require more work, and some distros still have Python 3.6 as the default version (e.g. openSUSE Leap 15.4). At least for now, I would still require 3.6 support.

@alexandrevicenzi alexandrevicenzi modified the milestones: 2.6-dev, 3.0-dev Mar 31, 2023
@alexandrevicenzi
Copy link
Owner

Hi, v3 branch is now published, but far away from finished, as I still have things on my local copy that I need to clean up and fix.

I just pushed what is currently working, so I don't break the theme in case someone wants to use it.

I also changed my mind about Python 3.6, it is EOL, and honestly, I prefer 3.10 now, but 3.8 would be the minimal version acceptable. For Pelican, I have no plans to support anything prior 4.8 in v3.

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

No branches or pull requests

2 participants