0
我不知道车轮。我有require.txt文件。还有一件事 - 轮子。我对wheel和require.txt感到困惑。我想用wheel来打包我的项目。如何使用wheel打包我的项目,这样我就可以使用一次简单的方式安装所有的项目依赖项。如何在python中使用滚轮打包项目
我不知道车轮。我有require.txt文件。还有一件事 - 轮子。我对wheel和require.txt感到困惑。我想用wheel来打包我的项目。如何使用wheel打包我的项目,这样我就可以使用一次简单的方式安装所有的项目依赖项。如何在python中使用滚轮打包项目
你可以用我的git,使与setup.py文件一个新的项目,并且运行后
pip install -e .
,使你的项目的新版本
https://github.com/adouani/create_template
编辑
例如:
# -*- coding: utf-8 -*-
import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()
with open(os.path.join(here, 'external_requirements.txt')) as f:
requires = f.readlines()
# on sépare la définition des dépendances internes des dépendances externes
requires.extend([
......
])
setup(
name='..........',
version='0.1.0.dev0',
description='',
long_description=README + '\n\n' + CHANGES,
classifiers=[
"Programming Language :: Python",
"Framework :: Pyramid",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
],
author='............',
author_email='',
url='',
keywords='web wsgi bfg pylons pyramid',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
install_requires=requires,
message_extractors={'.': [
('ihm/**.py', 'lingua_python', None),
('ihm/**.pt', 'lingua_xml', None),
('ihm/**.html', 'html', None),
('ihm/**.py', 'python', None),
('ihm/**.js', 'js', None),
]},
dependency_links=[
'............',
'.............',
'git+http://............#egg=ihm-0.7.0',
],
)
它正在创建一个虚拟项目。我想要我所有的项目依赖关系。 – lucy
是的,你把所有的文件放到项目和你的依赖文件中,然后运行命令pip install -e。 for internal package use dependency_links = [..] in setup.py并添加require.extend([...]) –
它是好的,但我需要轮子的实现。我有要求使用轮子来打包项目。 – lucy