Replies: 3 comments 6 replies
-
Pip attempts to build a wheel out of the tarball, and then installs from the wheel. |
Beta Was this translation helpful? Give feedback.
-
I had to add a setup.py and now I have the resulting tarball built on antiX-21 linux will install on Microsoft Windows using the Msys2 mingw environment. It still will not install into an antiX-21 virtual environment. setup.py: # the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
from os.path import dirname
from glob import glob
from setuptools import setup
def default_build():
'''Default Build.'''
data_files = []
section_files = glob("share/*.desktop")
data_files.append(('share/applications', section_files))
data_files.append(('share/icons', ['share/d-rats2.xpm']))
section_files = glob("forms/*.x?l")
data_files.append(('share/d-rats/forms', section_files))
section_files = glob("images/*")
section_files.append("d-rats2.ico")
section_files.append("share/d-rats2.xpm")
data_files.append(('share/d-rats/images', section_files))
ui_files = ['ui/addport.glade', 'ui/mainwindow.glade']
data_files.append(('share/d-rats/ui', ui_files))
section_files = ['COPYING']
data_files.append(('share/doc/d-rats/', section_files))
section_files = []
data_files.append(('share/man/man1', section_files))
locale_mo_files = glob("locale/*/LC_MESSAGES/D-RATS.mo")
mo_prefix = 'share/'
for file_name in locale_mo_files:
data_files.append((mo_prefix + dirname(file_name), [file_name]))
setup(scripts=['d-rats.py', 'd-rats_repeater.py'],
data_files=data_files)
default_build() Current pyproject.toml [build-system]
requires = ["setuptools>=40"]
build-backend = "setuptools.build_meta"
[project]
name = "D-Rats"
description = "A communications tool for D-STAR"
readme = "README.md"
requires-python = ">=3.7"
license = {text = "GPL-3"}
dynamic = ["version"]
dependencies = [
"lxml",
"pycairo",
"PyGObject",
"pyserial",
"Pillow",
"geopy",
"feedparser"
]
[tool.towncrier]
directory = "changes"
package = 'd_rats.version'
[tool.setuptools]
packages = ['d_rats', 'd_rats.map', 'd_rats.sessions', 'd_rats.ui' ]
[tool.setuptools.dynamic]
version = {attr = "d_rats.version.DRATS_PEP440_VERSION"} |
Beta Was this translation helpful? Give feedback.
-
Everything now appears to be working now. As I understand it, I should not need the setup.py at all, and that there should be some way to put all the stuff that is in the setup.py into the pyproject.toml. |
Beta Was this translation helpful? Give feedback.
-
I had this working before I upgraded my build system from Anti-X 20 (Debian Buster) to Anti-X 21 (Debian Bullseye).
Now the python -m Build is working, however the resulting tar ball will not install with pip into a virtualenv.
I must be missing something simple in my protject.toml file.
The pyprojecdt.toml and other details are in python -m build No module named 'packaging.requirements'
The build script output and the resulting filenames show that build found the project name and version, so what causing the install to fail?
Beta Was this translation helpful? Give feedback.
All reactions