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

Improve Python packaging #831

Merged
merged 2 commits into from
Jan 15, 2016
Merged

Improve Python packaging #831

merged 2 commits into from
Jan 15, 2016

Conversation

smurfix
Copy link
Contributor

@smurfix smurfix commented Dec 13, 2015

The first patch adds Debian packaging support.
The second patch fixes setup.py by using setuptools instead of distutils, and adding in py.test so that "setup.py test" works with Python 3.4+.

* distutils no longer works correctly
* fixed testing: use the py.test framework
@bitwiseman
Copy link
Member

To be honest, I don't know enough about this to know if it is correct or not. Could you provide some pointers to documentation I can read to understand this domain?

@smurfix
Copy link
Contributor Author

smurfix commented Dec 14, 2015

Hello Liam,

To be honest, I don't know enough about this to know if it is correct
or not. Could you provide some pointers to documentation I can read to
understand this domain?

Other than "it works"? ;-)

setuptools vs. distutils:
https://python-packaging-user-guide.readthedocs.org/en/latest/current/
"""
Packaging Tool Recommendations

  • Use setuptools to define projects and create Source Distributions.
    """

Debian packaging: the patch includes a minimal set of packaging files to
allow somebody to cleanly install the tools locally.
I'm a long-time Debian Developer, so I'm supposed to know what I'm
doing. :-P
References (a long and probably-boring read):
https://wiki.debian.org/Python/Packaging
https://www.debian.org/doc/packaging-manuals/python-policy/index.html
https://www.debian.org/doc/debian-policy/

-- Matthias Urlichs

@bitwiseman bitwiseman added this to the v1.6.0 milestone Dec 14, 2015
@bitwiseman
Copy link
Member

Yes, other than it works. :)

Okay, I'm getting a sense for the change now.

Do we need to update https://github.com/beautify-web/js-beautify/blob/master/CONTRIBUTING.md#publishing-a-release to include how to publish the Debian package?

You've updated this to install the python version of the tool, but the javascript/nodejs version is arguably better and includes the html beautifier. Or should the Debian package install both? Can it?

@smurfix
Copy link
Contributor Author

smurfix commented Dec 15, 2015

On 14.12.2015 23:33, Liam Newman wrote:

Do we need to update
https://github.com/beautify-web/js-beautify/blob/master/CONTRIBUTING.md#publishing-a-release
to include how to publish the Debian package?

Not really. It's just minimal packaging at this point. Getting it into
Debian proper would entail a bit more work.

Updating the Debian package's version would be a nice touch (it's in the
first line of …/debian/changelog), but again, doing this "properly"
requires running the "debchange" tool. I assume you don't want to force
people to do the release on a Debian machine. ;-)

You've updated this to install the python version of the tool, but the
a javascript/nodejs version is arguably better and includes the html
beautifier. Or should the Debian package install both?

That should be in a different package, as they have different
dependencies (the Python version requires … well, Python, while the
nodejs version needs node.js obviously).

I'm not at all familiar with how to package Node for Debian, though, and
most people don't bother and install via node.js instead of through the
Debian packaging system.

-- Matthias Urlichs

@bitwiseman
Copy link
Member

Could you add instructions to https://github.com/beautify-web/js-beautify/blob/master/CONTRIBUTING.md#publishing-a-release on how someone would update this? Whatever you think is reasonable. Including the note that Debian packages may lag behind regular release. Then I'll go ahead and merge.

Thanks for your patience and contribution.

@bitwiseman
Copy link
Member

@smurfix - I guess I'll just to take it as a given that you'll maintain the debian packages.

bitwiseman added a commit that referenced this pull request Jan 15, 2016
Improve Python packaging
@bitwiseman bitwiseman merged commit ff1cd5c into beautifier:master Jan 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants