Mentions légales du service

Skip to content
Snippets Groups Projects
Commit c6749ae4 authored by Théophile Bastian's avatar Théophile Bastian
Browse files

Meta: add packaging (setup.py) and gitignores

parent b9e58cbe
No related branches found
No related tags found
1 merge request!1Meta: add packaging (setup.py) and gitignores
__pycache__
*.egg-info
src/pipedream/asm/x86/instructions_xed.py
# Pipedream
# Install
## Install
### Generate the x86 instruction database
Before installing Pipedream, it is necessary to generate the database of x86
instructions from Intel XED:
```bash
## create X86 instruction database from Intel XED.
git submodule init
git submodule update
cd tools/extract-xed-instruction-database/
......@@ -10,3 +15,20 @@
make -C build -j
build/extract-xed-instruction-database print-instr-db -o ../../src/pipedream/asm/x86/instructions_xed.py
```
Alternatively, if you already have generated this file on another machine, you
may copy it over as `src/pipedream/asm/x86/instructions_xed.py`.
### Installing pipedream
It is recommended to install python dependencies, as well as pipedream itself,
into a virtualenv:
```bash
virtualenv -p python3 venv
source venv/bin/activate
pip install -e .
```
Note that this will break if you did not first generate the x86 instructions
database (see above).
setup.py 0 → 100644
#!/usr/bin/env python3
from pathlib import Path
from setuptools import setup, find_packages
def parse_requirements():
reqs = []
with open("requirements.txt", "r") as handle:
for line in handle:
reqs.append(line)
return reqs
def check_instructions_xed():
""" Checks that `instructions_xed.py` exists. Raises an Exception on failure. """
root_dir = Path(__file__).parent
instr_xed_path = root_dir / "src/pipedream/asm/x86/instructions_xed.py"
if not instr_xed_path.is_file():
raise Exception(
(
"Cannot find `instructions_xed.py` at {path}. Please check the "
"README for more details."
).format(path=instr_xed_path.as_posix())
)
check_instructions_xed()
packages = find_packages(where="src/")
setup(
name="pipedream",
version="0.0.1",
description="Pipedream",
author="CORSE",
url="https://gitlab.inria.fr/fgruber/pipedream",
packages=packages,
package_dir={package: "src/" + package.replace(".", "/") for package in packages},
include_package_data=True,
long_description=open("README.md").read(),
install_requires=parse_requirements(),
)
CMakeCache.txt
CMakeFiles
Makefile
cmake_install.cmake
extract-xed-instruction-database
xed-build-prefix
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment