django-rest-framework-datatables icon indicating copy to clipboard operation
django-rest-framework-datatables copied to clipboard

Replace setup and requirements files with pyproject.toml

Open jacklinke opened this issue 2 years ago • 4 comments

  • Fixes #135
  • Moves version number into toml file
  • Bumps version to 0.7.1
  • Not including poetry.lock per Poetry recommendations that it is not needed for libraries (https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control)
  • Also fixes minor sphinx block rendering issue

jacklinke avatar Feb 04 '23 01:02 jacklinke

Hi @jacklinke , thanks for your contribution ! I'm really not sure I want to force the usage of poetry. Correct me if I'm wrong (I've never used poetry), but this would break current installations that use pip.

Could it be possible to keep pip support along with poetry ?

izimobil avatar Feb 04 '23 12:02 izimobil

I agree with @izimobil - could we keep pip support?

matthewhegarty avatar Feb 18 '24 15:02 matthewhegarty

Could it be possible to keep pip support along with poetry ?

If you mean to keep the ability to do pip install against the repo, that still works due to the build backend:

https://github.com/jacklinke/django-rest-framework-datatables/blob/9b7bb47d280db56536f6d1caff6ac224da42b4e9/pyproject.toml#L59-L61

You can test it with:

pip install https://github.com/jacklinke/django-rest-framework-datatables/archive/add_pyproject_toml.zip

If you really don't like Poetry (which is fine, it's opinionated and not for everyone), there is an alternative to use pyproject.toml using setuptools, which you might find closer to the official standard.

browniebroke avatar Mar 26 '24 10:03 browniebroke

Could it be possible to keep pip support along with poetry ?

If you mean to keep the ability to do pip install against the repo, that still works due to the build backend:

https://github.com/jacklinke/django-rest-framework-datatables/blob/9b7bb47d280db56536f6d1caff6ac224da42b4e9/pyproject.toml#L59-L61

You can test it with:

pip install https://github.com/jacklinke/django-rest-framework-datatables/archive/add_pyproject_toml.zip

If you really don't like Poetry (which is fine, it's opinionated and not for everyone), there is an alternative to use pyproject.toml using setuptools, which you might find closer to the official standard.

To be honest, I don't know / never used Poetry, but reading the proposed pyproject.toml gives me headaches ;) Would adding something like this (copied from Django's pyproject.toml) be sufficient to address the original issue #135 ?

[build-system]
requires = ['setuptools>=40.8.0']
build-backend = 'setuptools.build_meta'

Maybe I'm getting old, but "If it ain't broke, don't fix it" comes to my mind...

izimobil avatar Mar 26 '24 11:03 izimobil