Skip to content

Commit

Permalink
Move VERSION inside chipsec/ directory
Browse files Browse the repository at this point in the history
  • Loading branch information
tweksteen committed Aug 4, 2016
1 parent 3871b8d commit a453c2a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
File renamed without changes.
1 change: 0 additions & 1 deletion source/tool/chipsec/helper/linux/cores.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <asm/types.h>
#include <linux/types.h>
#define u64 uint64_t
#include "../../../../drivers/linux/include/chipsec.h"

#define BUF_LEN 4096

Expand Down
2 changes: 1 addition & 1 deletion source/tool/chipsec_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def __init__(self, argv):
self._unkownPlatform = True
self._list_tags = False
self.version=" "
self.VERSION_FILE = os.path.join( self.CHIPSEC_FOLDER , "VERSION" )
self.VERSION_FILE = os.path.join( self.CHIPSEC_FOLDER , "chipsec", "VERSION" )
if os.path.exists( self.VERSION_FILE ):
with open(self.VERSION_FILE, "r") as verFile:
self.version = verFile.read()
Expand Down
14 changes: 7 additions & 7 deletions source/tool/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
tool_dir = os.path.dirname(os.path.abspath(__file__))

package_data = { "chipsec.cfg": ["*.xml", "*.xsd"],
".": ["VERSION"]
"chipsec": ["VERSION"]
}

if platform.system().lower() == "windows":
Expand All @@ -49,10 +49,10 @@

if platform.system().lower() == "linux":
data_files = []
extensions = [ Extension('cores', sources=['chipsec/helper/linux/cores.c']) ]
extensions = [ Extension('chipsec.helper.linux.cores', sources=['chipsec/helper/linux/cores.c']) ]

version = ""
VERSION_FILE = os.path.join( os.path.dirname( __file__ ),'VERSION' )
VERSION_FILE = os.path.join(os.path.dirname(__file__), 'chipsec', 'VERSION')
if os.path.exists( VERSION_FILE ):
with open(VERSION_FILE, "r") as verFile:
version = "." + verFile.read()
Expand All @@ -61,16 +61,15 @@
if os.path.exists( build_dir ):
dir_util.remove_tree( build_dir )

mypackages = ['.']
for current, dirs, files in os.walk(tool_dir ):
#TODO: Replace with setuptools find_packages()
mypackages = []
for current, dirs, files in os.walk(tool_dir):
for file in files:
if file == "__init__.py":
pkg = current.replace(tool_dir+os.path.sep,"")
pkg = pkg.replace(os.path.sep,'.')
mypackages.append(pkg)

#print mypackages


setup(
name = 'chipsec',
Expand All @@ -81,6 +80,7 @@
url = 'https://github.com/chipsec/chipsec',

data_files = data_files,
scripts = ['chipsec_main.py', 'chipsec_util.py'],
packages = mypackages,
package_data = package_data,
ext_modules = extensions
Expand Down

0 comments on commit a453c2a

Please sign in to comment.