~sircmpwn/sr.ht-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
16 7

Update install_requires to help bring up a minimal dev hacking environment

Details
Message ID
<20210402022357.t6uf7y6rxpwirexc@Ridl3y>
DKIM signature
missing
Download raw message
Hello,

This patchset updates some `install_requires` lists in various `setup.py`s,
enough to get the initial `run.py` working

Somewhat related: 
https://lists.sr.ht/~sircmpwn/sr.ht-discuss/%3C20210307163630.enwbghloptrkrm4o%40zillasnegl%3E

As the officially recommended way of getting a sourcehut installation is
through one of the 3 distro's package manager, these changes are mostly for
devs hacking onto the app and wrangling dependencies using pip :)

I chose to have the packages that depend on the core celery webhook just depend
on celery as it makes the dependency resolution a bit easier, as
`srht[webhooks]` won't automatically resolve. But I do understand if the
alternative is preferred

Also the `emailthreads` dependency in `lists.sr.ht` won't work until
https://github.com/emersion/python-emailthreads/issues/6
is resolved

-- 
Marco Sirabella

[PATCH core.sr.ht 1/2] Pin sqlalchemy < 1.4.0 for sqlalchemy-utils

Details
Message ID
<20210402022459.28334-1-marco@sirabella.org>
In-Reply-To
<20210402022357.t6uf7y6rxpwirexc@Ridl3y> (view parent)
DKIM signature
missing
Download raw message
Patch: +1 -1
The real fix is for sqlalchemy-utils to pin this properly,
but looks like [they aren't for some
reason](https://github.com/kvesteri/sqlalchemy-utils/issues/505) And
would rather just fix the problems.

This is unneccessary when
<https://github.com/kvesteri/sqlalchemy-utils/pull/506> is merged, and
pestering them might be the better fix.
---
 setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 55a3870..e5f4ede 100755
--- a/setup.py
+++ b/setup.py
@@ -28,7 +28,7 @@ setup(
  install_requires = [
      'flask',
      'humanize',
      'sqlalchemy',
      'sqlalchemy<1.4.0',
      'sqlalchemy-utils',
      'psycopg2',
      'markdown',
-- 
2.26.3

[PATCH core.sr.ht 2/2] Add redis as a dependency

Details
Message ID
<20210402022459.28334-2-marco@sirabella.org>
In-Reply-To
<20210402022357.t6uf7y6rxpwirexc@Ridl3y> (view parent)
DKIM signature
missing
Download raw message
Patch: +1 -0
This is pulled in from `srht/redis.py` which comes from `service.py`
---
 setup.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/setup.py b/setup.py
index e5f4ede..60b93a0 100755
--- a/setup.py
+++ b/setup.py
@@ -41,6 +41,7 @@ setup(
      'cryptography',
      'prometheus_client',
      'alembic',
      'redis',
  ],
  license = 'BSD-3-Clause',
  package_data={
-- 
2.26.3

[PATCH git.sr.ht] Add minio dependency

Details
Message ID
<20210402022544.28600-1-marco@sirabella.org>
In-Reply-To
<20210402022357.t6uf7y6rxpwirexc@Ridl3y> (view parent)
DKIM signature
missing
Download raw message
Patch: +1 -1
It is used in `gitsrht/repos.py`
---
 setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 8d1bcd7..1edffc1 100755
--- a/setup.py
+++ b/setup.py
@@ -31,7 +31,7 @@ setup(
  author = 'Drew DeVault',
  author_email = 'sir@cmpwn.com',
  url = 'https://git.sr.ht/~sircmpwn/git.sr.ht',
  install_requires = ['srht', 'scmsrht', 'pygit2'],
  install_requires = ['srht', 'scmsrht', 'pygit2', 'minio'],
  license = 'AGPL-3.0',
  package_data={
      'gitsrht': [
-- 
2.26.3
Details
Message ID
<CACVRDE01WWJ.CM8VMLGACEW0@taiga>
In-Reply-To
<20210402022357.t6uf7y6rxpwirexc@Ridl3y> (view parent)
DKIM signature
missing
Download raw message
On Thu Apr 1, 2021 at 10:23 PM EDT, Marco Sirabella wrote:
> Hello,
>
> This patchset updates some `install_requires` lists in various
> `setup.py`s,
> enough to get the initial `run.py` working
>
> Somewhat related:
> https://lists.sr.ht/~sircmpwn/sr.ht-discuss/%3C20210307163630.enwbghloptrkrm4o%40zillasnegl%3E
>
> As the officially recommended way of getting a sourcehut installation
> is through one of the 3 distro's package manager, these changes are
> mostly for devs hacking onto the app and wrangling dependencies using
> pip :)

Those devs are not supported. No thanks.

[PATCH hub.sr.ht] Add pyyaml dependency

Details
Message ID
<20210402022557.28670-1-marco@sirabella.org>
In-Reply-To
<20210402022357.t6uf7y6rxpwirexc@Ridl3y> (view parent)
DKIM signature
missing
Download raw message
Patch: +1 -1
This is imported in hubsrht/services.py
---
 setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index a866db3..6b5dcdd 100755
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,7 @@ setup(
  author = 'Drew DeVault',
  author_email = 'sir@cmpwn.com',
  url = 'https://git.sr.ht/~sircmpwn/hub.sr.ht',
  install_requires = ['srht'],
  install_requires = ['srht', 'pyyaml'],
  license = 'AGPL-3.0',
  package_data={
      'hubsrht': [
-- 
2.26.3

[core.sr.ht/patches] build failed

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CACVRV3KEAPK.14SJ0FW4MLPIA@cirno>
In-Reply-To
<20210402022459.28334-2-marco@sirabella.org> (view parent)
DKIM signature
missing
Download raw message
core.sr.ht/patches: FAILED in 1m14s

[Update install_requires to help bring up a minimal dev hacking environment][0] from [Marco Sirabella][1]

[0]: https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/21731
[1]: marco@sirabella.org

✗ #475159 FAILED core.sr.ht/patches/alpine.yml    https://builds.sr.ht/~sircmpwn/job/475159
✗ #475160 FAILED core.sr.ht/patches/archlinux.yml https://builds.sr.ht/~sircmpwn/job/475160
✗ #475161 FAILED core.sr.ht/patches/debian.yml    https://builds.sr.ht/~sircmpwn/job/475161

[PATCH lists.sr.ht] Add celery to dependencies

Details
Message ID
<20210402023325.29514-1-marco@sirabella.org>
In-Reply-To
<20210402022357.t6uf7y6rxpwirexc@Ridl3y> (view parent)
DKIM signature
missing
Download raw message
Patch: +1 -0
Imported in listssrht/process.py
---
 setup.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/setup.py b/setup.py
index 4675422..3ee493f 100755
--- a/setup.py
+++ b/setup.py
@@ -37,6 +37,7 @@ setup(
      'aiosmtpd',
      'asyncpg',
      'pygit2',
      'celery',
  ],
  license = 'AGPL-3.0',
  package_data={
-- 
2.26.3

[PATCH scm.sr.ht] Add celery as a dependency

Details
Message ID
<20210402023331.29577-1-marco@sirabella.org>
In-Reply-To
<20210402022357.t6uf7y6rxpwirexc@Ridl3y> (view parent)
DKIM signature
missing
Download raw message
Patch: +1 -1
Technically celery is a dependency of the core's celery webhook, but I
opt for just marking it as a dependency here instead of an
extras_requires in the core because the dev workflow is probably `pip
install core.sr.ht && pip install scm.sr.ht` and that won't catch an
`srht[webhooks-celery]` dependency
---
 setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index c113b78..51eb378 100755
--- a/setup.py
+++ b/setup.py
@@ -21,7 +21,7 @@ setup(
  author = 'Ludovic Chabant',
  author_email = 'ludovic@chabant.com',
  url = 'https://git.sr.ht/~sircmpwn/scm.sr.ht',
  install_requires = ['srht'],
  install_requires = ['srht', 'celery'],
  license = 'AGPL-3.0',
  package_data={
      'scmsrht': [
-- 
2.26.3

[PATCH todo.sr.ht] Add celery dependency

Details
Message ID
<20210402023341.29657-1-marco@sirabella.org>
In-Reply-To
<20210402022357.t6uf7y6rxpwirexc@Ridl3y> (view parent)
DKIM signature
missing
Download raw message
Patch: +1 -0
Technically a dependency of core.sr.ht celery webhooks, but we use those
here and they are an optional dependcy of core, so...
---
 setup.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/setup.py b/setup.py
index a282b28..c49c4cf 100755
--- a/setup.py
+++ b/setup.py
@@ -34,6 +34,7 @@ setup(
  install_requires = [
    'pystache',
    'srht',
    'celery',
  ],
  license = 'AGPL-3.0',
  package_data={
-- 
2.26.3

Re: [PATCH scm.sr.ht] Add celery as a dependency

Details
Message ID
<CACVXL8934O5.26AXAW5AXAI47@taiga>
In-Reply-To
<20210402023331.29577-1-marco@sirabella.org> (view parent)
DKIM signature
missing
Download raw message
NACK to all of these patches. We don't support this installation method.
Don't waste your time.
Details
Message ID
<d0850d82-0bf0-09a8-afba-76a956446e9a@archlinux.org>
In-Reply-To
<CACVRDE01WWJ.CM8VMLGACEW0@taiga> (view parent)
DKIM signature
missing
Download raw message
On 4/1/21 10:25 PM, Drew DeVault wrote:
> On Thu Apr 1, 2021 at 10:23 PM EDT, Marco Sirabella wrote:
>> Hello,
>>
>> This patchset updates some `install_requires` lists in various
>> `setup.py`s,
>> enough to get the initial `run.py` working
>>
>> Somewhat related:
>> https://lists.sr.ht/~sircmpwn/sr.ht-discuss/%3C20210307163630.enwbghloptrkrm4o%40zillasnegl%3E
>>
>> As the officially recommended way of getting a sourcehut installation
>> is through one of the 3 distro's package manager, these changes are
>> mostly for devs hacking onto the app and wrangling dependencies using
>> pip :)
> 
> Those devs are not supported. No thanks.

It also represents a way for distro packagers to follow along with the
requirements, which might be easier than cribbing from another distro
packaging recipe with an unfamiliar format.

And, particularly, some distro package managers actually look at
install_requires and add them to the package too.

For example, Fedora does this. Documented here:
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_automatically_generated_dependencies


-- 
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User
Details
Message ID
<1d1f9c2d-eb47-61e9-a5f8-9ef1ae30e729@laxalde.org>
In-Reply-To
<d0850d82-0bf0-09a8-afba-76a956446e9a@archlinux.org> (view parent)
DKIM signature
missing
Download raw message
Eli Schwartz a écrit :
> On 4/1/21 10:25 PM, Drew DeVault wrote:
>> On Thu Apr 1, 2021 at 10:23 PM EDT, Marco Sirabella wrote:
>>> Hello,
>>>
>>> This patchset updates some `install_requires` lists in various
>>> `setup.py`s,
>>> enough to get the initial `run.py` working
>>>
>>> Somewhat related:
>>> https://lists.sr.ht/~sircmpwn/sr.ht-discuss/%3C20210307163630.enwbghloptrkrm4o%40zillasnegl%3E
>>>
>>> As the officially recommended way of getting a sourcehut installation
>>> is through one of the 3 distro's package manager, these changes are
>>> mostly for devs hacking onto the app and wrangling dependencies using
>>> pip :)
>>
>> Those devs are not supported. No thanks.
> 
> It also represents a way for distro packagers to follow along with the
> requirements, which might be easier than cribbing from another distro
> packaging recipe with an unfamiliar format.

True.

> And, particularly, some distro package managers actually look at
> install_requires and add them to the package too.
> 
> For example, Fedora does this. Documented here:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_automatically_generated_dependencies

Debian does this as well: 
https://manpages.debian.org/buster/dh-python/dh_python3.1.en.html#dependencies

Re: [PATCH scm.sr.ht] Add celery as a dependency

Details
Message ID
<4716f21d-b994-c16a-ab3a-cb0756fe0364@mnus.de>
In-Reply-To
<CACVXL8934O5.26AXAW5AXAI47@taiga> (view parent)
DKIM signature
missing
Download raw message
On 02/04/2021 04.33, Drew DeVault wrote:
> NACK to all of these patches. We don't support this installation method.
> Don't waste your time.

Then why bother with having an install_requires section at all if it's 
incomplete and obviously not necessary?
Details
Message ID
<CAD8YMJL65BM.30Y96S5SMO4UC@taiga>
In-Reply-To
<1d1f9c2d-eb47-61e9-a5f8-9ef1ae30e729@laxalde.org> (view parent)
DKIM signature
missing
Download raw message
Alright, I'll try to be less moody on this one. Python sucks at this!
I'll go ahead and apply this patch series later today.
Details
Message ID
<CADFL5Z6X31I.2Z7YWVZIGTGMW@taiga>
In-Reply-To
<d0850d82-0bf0-09a8-afba-76a956446e9a@archlinux.org> (view parent)
DKIM signature
missing
Download raw message
Okay, I've installed some, but not all of these. The issue with
sqlalchemy-utils is an upstream problem, not ours, and the celery
dependency is part of core.sr.ht, not the downstream.s

Re: [PATCH scm.sr.ht] Add celery as a dependency

Geert Stappers <stappers@stappers.nl>
Details
Message ID
<20210405073848.rpp3amisox2p3dpv@gpm.stappers.nl>
In-Reply-To
<4716f21d-b994-c16a-ab3a-cb0756fe0364@mnus.de> (view parent)
DKIM signature
missing
Download raw message
On Fri, Apr 02, 2021 at 10:15:02AM +0200, minus wrote:
> On 02/04/2021 04.33, Drew DeVault wrote:
> > NACK to all of these patches. We don't support this installation method.
> > Don't waste your time.
> 
> Then why bother with having an install_requires section at all if it's
> incomplete and obviously not necessary?

Good question
Reply to thread Export thread (mbox)