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

Update Build System #5

Open
eons44 opened this issue Jul 8, 2024 · 0 comments
Open

Update Build System #5

eons44 opened this issue Jul 8, 2024 · 0 comments

Comments

@eons44
Copy link

eons44 commented Jul 8, 2024

Python Build System & Pip Package Need To Be Updated

Problem

Installation on Ubuntu 22.04 fails with:

#pip install tahoestaticfs
Collecting tahoestaticfs
  Using cached tahoestaticfs-0.1.1.tar.gz (39 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
  WARNING: Generating metadata for package tahoestaticfs produced metadata for project name unknown. Fix your #egg=tahoestaticfs fragments.
Discarding https://files.pythonhosted.org/packages/9e/23/1ba2f55d6da5e8887d5ad77e89a319e2726e340f5ba79c8940e3828b2e96/tahoestaticfs-0.1.1.tar.gz#sha256=055092f9957a255861f1900d1fa6fdf2cc83bab5c282a9b3e194751a0ec4644b (from https://pypi.org/simple/tahoestaticfs/) (requires-python:>=3.7): Requested unknown from https://files.pythonhosted.org/packages/9e/23/1ba2f55d6da5e8887d5ad77e89a319e2726e340f5ba79c8940e3828b2e96/tahoestaticfs-0.1.1.tar.gz#sha256=055092f9957a255861f1900d1fa6fdf2cc83bab5c282a9b3e194751a0ec4644b has inconsistent name: filename has 'tahoestaticfs', but metadata has 'unknown'
  Using cached tahoestaticfs-0.1.tar.gz (39 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
  WARNING: Generating metadata for package tahoestaticfs produced metadata for project name unknown. Fix your #egg=tahoestaticfs fragments.
Discarding https://files.pythonhosted.org/packages/3b/ea/54be47dca7730ec8ffceaf9ea60003786645d3cebacc77f1f6acbc12ce76/tahoestaticfs-0.1.tar.gz#sha256=8b2971897dcc1a00f8d171c685d0e10debf06654d8a1a5a1298846b51e1db598 (from https://pypi.org/simple/tahoestaticfs/) (requires-python:>=3.7): Requested unknown from https://files.pythonhosted.org/packages/3b/ea/54be47dca7730ec8ffceaf9ea60003786645d3cebacc77f1f6acbc12ce76/tahoestaticfs-0.1.tar.gz#sha256=8b2971897dcc1a00f8d171c685d0e10debf06654d8a1a5a1298846b51e1db598 has inconsistent name: filename has 'tahoestaticfs', but metadata has 'unknown'
ERROR: Could not find a version that satisfies the requirement tahoestaticfs (from versions: 0.1, 0.1.1)
ERROR: No matching distribution found for tahoestaticfs

System Info

#uname -a
Linux swift 5.15.0-113-generic #123-Ubuntu SMP Mon Jun 10 08:16:17 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
#lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:        22.04
Codename:       jammy
#python3 --version
Python 3.10.12
#pip --version
pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)

Resolution

I was able to make this work by adding the following setup.cfg:

[metadata]
name = tahoestaticfs
version = v0.0.0
author = pv
description = Fuse filesystem that enables rw access to a Tahoe-LAFS grid.
license_files = LICENSE.txt
long_description = file: README.md
long_description_content_type = text/markdown

url = https://github.com/pv/tahoestaticfs/
project_urls =
    Bug Tracker = https://github.com/pv/tahoestaticfs//issues

classifiers =
    Programming Language :: Python :: 3
    License :: OSI Approved :: MIT License
    Operating System :: OS Independent
    Development Status :: 4 - Beta

[options]
package_dir =
    = pkg
packages = find:
python_requires = >=3.7
[options.packages.find]
where = pkg

[options.entry_points]
console_scripts =
    tahoestaticfs = tahoestaticfs:tahoestaticfs

However, I'm pretty sure adding that is not the right solution. I think there's a better python build process available, I just haven't looked into it enough. In the meantime, you might consider adding this setup.cfg & republishing the package to pypi.

Fork

I'm really excited that Tahoe finally finished their python3 rework, and I cannot find anything on using the latest version of Tahoe with the latest Pyfilesystem. So, I'm super glad you made this, that you wrote good tests, and that it works!

I'd like to play around with the intermediate cache layer, so I forked this repo and made Truckeefs. I fixed the build issue using my own tools, which I didn't want to make a pr for without first discussing it with you @pv . My tools also allow for config values to be read from the environment, config files, etc.. I've found storing the rootcap in a file or environment variable much easier than your recommended awk command. If you'd like any advice on how to make that ux easier, I'm happy to ideate with you.

Thanks again for your work!

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

No branches or pull requests

1 participant