-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update setup.py and add installation docs
- Loading branch information
1 parent
e77a8b9
commit 9a15809
Showing
4 changed files
with
133 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,58 @@ | ||
# Installation | ||
|
||
## Anaconda | ||
As some requirements for inbuilt plugins of bim2sim are not available via PyPi | ||
but only via Anaconda, the best way to install bim2sim is using conda. | ||
## Base Library | ||
|
||
`conda install bim2sim -c # todo` | ||
As some requirements for core functionality of `bim2sim` are not available via | ||
PyPi but only via Anaconda an installation only via PyPi is sadly not possible | ||
for now. | ||
For now the easiest way to install `bim2sim` is the following: | ||
|
||
if all worked well you should be able to start using bim2sim. Try | ||
``` | ||
# create fresh python environment with conda | ||
conda create -n bim2sim python=3.9 | ||
# activate your environment | ||
conda activate bim2sim | ||
# clone bim2sim repository (you can also use SSH if you prefer) | ||
git clone https://github.com/BIM2SIM/bim2sim.git | ||
cd bim2sim | ||
# go into main directory of the repo where setup.py is stored and run | ||
python setup.py install | ||
# afterwards install the packages which are installable via pip | ||
conda install -c conda-forge pythonocc-core=7.6.2 -y | ||
conda install -c conda-forge ifcopenshell -y | ||
``` | ||
|
||
If all worked well you should be able to start using bim2sim. Try | ||
|
||
`python bim2sim -h` | ||
|
||
to see all available commands. For further reading see [](First_steps). | ||
We will improve this process by our own anaconda image soon. | ||
|
||
## Plugins | ||
|
||
To use the Plugins you have to install the requirements of the corresponding | ||
plugins. Therefore just go the Plugin folder you want to use under | ||
`bim2sim/plugins/` and run | ||
|
||
``` | ||
pip install -r requirements.txt | ||
``` | ||
|
||
to see all available commands. For further reading see | ||
[First Steps](First_steps). | ||
|
||
|
||
## Docker | ||
tbd | ||
|
||
We already create docker images for each the base `bim2sim` tool as for every | ||
Plugin, but currently these are only available through our own registry. You can | ||
still build the images yourself based on the existing Dockerfiles. As our | ||
current structure is a bit complicated, please have a look at the explanation of | ||
the [Docker Structure](docker_structure). | ||
|
||
We will release the images on DockerHub soon to make them accessible for | ||
everyone (see [issuue 452](https://github.com/BIM2SIM/bim2sim/issues/452)). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,74 @@ | ||
from setuptools import setup, find_packages | ||
import glob | ||
|
||
|
||
data_files = [] | ||
directories = glob.glob('bim2sim\\assets\\') | ||
for directory in directories: | ||
files = glob.glob(directory + '*') | ||
data_files.append((directory, files)) | ||
|
||
with open("README.md", 'r') as f: | ||
long_description = f.read() | ||
with open("requirements.txt", 'r') as f: | ||
required = f.read().splitlines() | ||
VERSION = "0.1.0" | ||
|
||
|
||
setup( | ||
name='bim2sim', | ||
version='0.1.dev0', | ||
version=VERSION, | ||
description='Create simulation models from IFC files', | ||
license="???", | ||
license="LICENSE", | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
author='BIM2SIM', | ||
author_email='???', | ||
url="???", | ||
packages=find_packages() + ['bim2sim.assets', 'bim2sim.backends'], | ||
author_email='[email protected]', | ||
url="https://github.com/BIM2SIM/bim2sim", | ||
packages=find_packages(include=['bim2sim*']), | ||
include_package_data=True, | ||
data_files=data_files, | ||
# package_data={'': ['assets/*.*']}, | ||
python_requires='>=3.6.0', | ||
install_requires=[ | ||
'docopt', 'numpy', 'python-dateutil', | ||
'mako', 'networkx>=2.2', 'pint' | ||
], # external packages as dependencies | ||
extras_require={ | ||
'manual_install': ['ifcopenshell>=0.6'], | ||
'plotting': ['matplotlib'], | ||
'communication': ['rpyc'], | ||
data_files = [('bim2sim\\assets\\enrichment\\hvac', ['bim2sim\\assets\\enrichment\\hvac\\TypeBuildingElements.json']), | ||
('bim2sim\\assets\\enrichment\\material', ['bim2sim\\assets\\enrichment\\material\\MaterialTemplates.json', | ||
'bim2sim\\assets\\enrichment\\material\\TypeBuildingElements.json']), | ||
('bim2sim\\assets\\enrichment\\usage', ['bim2sim\\assets\\enrichment\\usage\\commonUsages.json', | ||
'bim2sim\\assets\\enrichment\\usage\\customUsages.json', | ||
'bim2sim\\assets\\enrichment\\usage\\customUsagesAC20-FZK-Haus_with_SB55.json', | ||
'bim2sim\\assets\\enrichment\\usage\\customUsagesAC20-Institute-Var-2_with_SB-1-0.json', | ||
'bim2sim\\assets\\enrichment\\usage\\customUsagesFM_ARC_DigitalHub_fixed002.json', | ||
'bim2sim\\assets\\enrichment\\usage\\customUsagesFM_ARC_DigitalHub_with_SB_neu.json', | ||
'bim2sim\\assets\\enrichment\\usage\\customUsagesAC20-Institute-Var-2_with_SB-1-0.json', | ||
'bim2sim\\assets\\enrichment\\usage\\customUsagesFM_ARC_DigitalHub_fixed002.json', | ||
'bim2sim\\assets\\enrichment\\usage\\customUsagesFM_ARC_DigitalHub_with_SB_neu.json', | ||
'bim2sim\\assets\\enrichment\\usage\\customUsagesFM_ARC_DigitalHub_with_SB88.json', | ||
'bim2sim\\assets\\enrichment\\usage\\customUsagesFM_ARC_DigitalHub_with_SB89.json', | ||
'bim2sim\\assets\\enrichment\\usage\\customUsagesKIT-EDC_with_SB.json', | ||
'bim2sim\\assets\\enrichment\\usage\\UseConditions.json', | ||
'bim2sim\\assets\\enrichment\\usage\\UseConditionsFM_ARC_DigitalHub_fixed002.json', | ||
'bim2sim\\assets\\enrichment\\usage\\UseConditionsFM_ARC_DigitalHub_with_SB_neu.json', | ||
'bim2sim\\assets\\enrichment\\usage\\UseConditionsFM_ARC_DigitalHub_with_SB89.json']), | ||
('bim2sim\\assets\\finder', ['bim2sim\\assets\\finder\\template_ArchiCAD.json', | ||
'bim2sim\\assets\\finder\\template_Autodesk Revit.json', | ||
'bim2sim\\assets\\finder\\template_LuArtX_Carf.json', | ||
'bim2sim\\assets\\finder\\template_TRICAD-MS.json']), | ||
|
||
|
||
('bim2sim\\assets\\templates\\check_ifc', ['bim2sim\\assets\\templates\\check_ifc\\inst_template', | ||
'bim2sim\\assets\\templates\\check_ifc\\prop_template', | ||
'bim2sim\\assets\\templates\\check_ifc\\summary_template']), | ||
('bim2sim\\assets\\templates\\modelica', ['bim2sim\\assets\\templates\\modelica\\tmplModel.txt']), | ||
('bim2sim\\assets\\weatherfiles', ['bim2sim\\assets\\weatherfiles\\DEU_NW_Aachen.105010_TMYx.epw', | ||
'bim2sim\\assets\\weatherfiles\\DEU_NW_Aachen.105010_TMYx.mos']), | ||
('bim2sim\\assets\\ifc_example_files', ['bim2sim\\assets\\ifc_example_files\\AC20-FZK-Haus.ifc', | ||
'bim2sim\\assets\\ifc_example_files\\ERC_EBC_mainbuilding.ifc', | ||
'bim2sim\\assets\\ifc_example_files\\hvac_heating.ifc' ]) | ||
|
||
], | ||
|
||
package_data={'': ['bim2sim/assets/*.*']}, | ||
python_requires='>=3.8.*,<3.10.*', | ||
install_requires=[required | ||
], | ||
|
||
classifiers=[ | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
], | ||
extras_require = { | ||
'manual_install': ['ifcopenshell>=0.6', 'pythonocc-core==7.6.2'], | ||
}, | ||
entry_points={ | ||
entry_points = { | ||
'console_scripts': [ | ||
'bim2sim = bim2sim:main', | ||
], | ||
|