Упаковка с помощью pyproject.toml, которая будет включать в себя другие многоуровневые каталоги.Python

Программы на Python
Ответить Пред. темаСлед. тема
Гость
 Упаковка с помощью pyproject.toml, которая будет включать в себя другие многоуровневые каталоги.

Сообщение Гость »


I have spent two full days trying to figure this out with no success. I have a python project that I want to package. That is the easy part. The part I can't figure out is how to copy other multilevel folders into the package.

I am trying to get the myproj as a package with the dosomething.py but also have the algorithms and configs folders in there entirety (folder structure and all files included).

Project structure:

- myproj - src - myproj - dosomething.py - tests - test_do_something.py - algorithms - Type1 - algorithm1 - eval.py - hyperparameters.yml - a bunch of other folders and files - algorithm2 - eval.py - hyperparameters.yml - a bunch of other folders and files - Type2 - algorithm3 - eval.py - hyperparameters.yml - a bunch of other folders and files - algorithm4 - eval.py - hyperparameters.yml - a bunch of other folders and files - configs - type1.yml - type2.yml - pyproject.toml - mypy.ini - tox.ini - run-mypy Contents of pyproject.toml:

[build-system] requires = ["setuptools >= 61.0", "wheel"] build-backend = "setuptools.build_meta" [project] name = "myproj" version = "0.0.1" readme = "README.md" dependencies = [ "numpy >= 1.26.4", ] [project.urls] repository = "https://gitlab.com/somerepo [project.optional-dependencies] dev = [ "tox", "pytest", "pytest-sugar", "pytest-cov", "black", "flake8", "flake8-docstrings", "mypy", "pre-commit", "sphinx", "sphinx-rtd-theme" ] After doing a pip install in a new conda env, I am looking for the following:

- env/test_env/lib/python3.9/site-packages - myproj - algorithms and everything under it - configs and everything under it - dosomething.py I have tried MANIFEST.in, I have tried everything on this page: https://setuptools.pypa.io/en/latest/us ... files.html

I figure this would be trivial to copy folders and files in the entirety into a package folder but I am stumped.

Any help would be greatly appreciated!


Источник: https://stackoverflow.com/questions/780 ... irectories
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Python»